Ejemplo n.º 1
0
 protected void grillaColores_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
 {
     try
     {
         string descripcion = e.NewValues["descripcion"].ToString();
         ControladorGeneral.InsertarActualizarColor(0, descripcion);
         e.Cancel = true;
         grillaColores.CancelEdit();
         CargarGrilla();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 protected void grillaColores_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
 {
     try
     {
         int    codigo      = Convert.ToInt32(e.Keys[0]);
         string descripcion = e.NewValues["descripcion"].ToString();
         ControladorGeneral.InsertarActualizarColor(codigo, descripcion);
         e.Cancel = true;
         grillaColores.CancelEdit();
         CargarGrilla();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }