コード例 #1
0
 private void cargarRoles()
 {
     try
     {
         this.bRoles             = new GestorDocumental.Controllers.PerfilesController();
         this.gvRoles.DataSource = this.bRoles.obtenerRoles();
         this.gvRoles.DataBind();
     }
     catch (Exception exception)
     {
         this.lblerror.Text = exception.Message;
         this.UpdatePanel4.Update();
     }
 }
コード例 #2
0
 protected void gvRoles_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     try
     {
         this.bRoles = new GestorDocumental.Controllers.PerfilesController();
         P_Roles     r   = new P_Roles();
         GridViewRow row = this.gvRoles.Rows[e.RowIndex];
         r.DescRol = ((TextBox)row.Cells[1].Controls[1]).Text;
         r.RolId   = int.Parse(((Label)row.Cells[0].Controls[1]).Text);
         this.bRoles.InsetarRol(r);
         this.gvRoles.EditIndex = -1;
         this.cargarRoles();
     }
     catch (Exception exception)
     {
         this.lblerror.Text = exception.Message;
         this.UpdatePanel4.Update();
     }
 }
コード例 #3
0
 protected void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         this.bRoles = new GestorDocumental.Controllers.PerfilesController();
         P_Roles r = new P_Roles
         {
             DescRol = this.txtDescPerfil.Text
         };
         this.bRoles.InsetarRol(r);
         this.cargarRoles();
         this.UpdatePanel3.Update();
     }
     catch (Exception exception)
     {
         this.lblerror.Text = exception.Message;
         this.UpdatePanel4.Update();
     }
 }