May 30, 2011, 4:52 PM
confirmation message from the event gridpanel RowCommand
Gentlemen,
nesecito before running the delete, I asked if you want and if you want to delete the record otherwise not.
this attempt to do so from a command event of a gridpanel.
this is my code.
nesecito before running the delete, I asked if you want and if you want to delete the record otherwise not.
this attempt to do so from a command event of a gridpanel.
this is my code.
protected void Command(object sender, DirectEventArgs e)
{
string fileWatchID = e.ExtraParams["id"];
string comando = e.ExtraParams["command"];
if(comando == "Delete")
{
Ent_Maestro oentidad = new Ent_Maestro();
oentidad.Id_categoria = Convert.ToInt32(fileWatchID);
onegocio_M.Eliminar_Categoria(oentidad);
Listar_Todo_Cat_Grid();
X.Msg.Notify("Notificacion", "Registro Eliminado Correctamente.").Show();
limpiarform_cat();
}
else
{
if (comando == "Edit")
{
int ID_CATEGORIA = Convert.ToInt32(fileWatchID);
Ent_Maestro oentidad = new Ent_Maestro();
DataSet tabla = new DataSet();
oentidad.Id_categoria = ID_CATEGORIA;
tabla = onegocio_M.Buscar_Categoria_Id(oentidad);
txtid_cat.Text = tabla.Tables[0].Rows[0]["ID_CATEGORIA"].ToString();
txtdec_cat.Text = tabla.Tables[0].Rows[0]["DESC_CATEGORIA"].ToString();
txtprov_cat.Text = tabla.Tables[0].Rows[0]["NOM_PROVEEDOR"].ToString();
txtresp_cat.Text = tabla.Tables[0].Rows[0]["NOM_RESPONSABLE"].ToString();
}
}
many thanks in advance.