protected void GridView_Lotes_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e) { try { e.Cancel = true; clsLotes Lote = new clsLotes(); FG._NombreUsuario = HttpContext.Current.User.Identity.Name; string IdentityUser = FG.CrearIdentificadorUsuario(FG._NombreUsuario); Lote.IdLote = 0; Lote.IdBloque = Convert.ToInt32(e.NewValues["IdBloque"].ToString()); Lote.NumeroLote = e.NewValues["NumeroLote"].ToString(); Lote.Area = Convert.ToDouble(e.NewValues["Area"]); Neg.AgregarActualizarLote(Lote, IdentityUser); string MsjSQL = FG.Obtener_MensajeSQL(IdentityUser); if (MsjSQL != "") { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "err_msj", "alert('" + MsjSQL + "');", true); return; } else { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "err_msj", "alert('Registro creado con éxito.');", true); GridView_Lotes.CancelEdit(); } } catch (Exception Ex) { FG.Controlador_Error(Ex, Page.Response); } }