private void dtgResponsables_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { IResponsable responsable = ResponsableFactory.GetResponsable(); responsable.ResponsableID = Convert.ToInt32(this.dtgResponsables.DataKeys[e.Item.ItemIndex]); responsable.Consultar(); try { responsable.Eliminar(usuario); this.dtgResponsables.EditItemIndex = -1; //this.BindGrid(); try { this.BindGrid(); } catch (Exception) { this.dtgResponsables.CurrentPageIndex = 0; this.BindGrid(); } } catch (Exception ex) { string mensaje = ex.Message; try { mensaje = this.TraducirTexto(ex.Message); if (mensaje == "" || mensaje == null) { mensaje = ex.Message; } } catch (Exception) { mensaje = ex.Message; } ((ErrorWeb)this.phErrores.Controls[0]).setMensaje(mensaje); } }