protected void lnk_change_status_click(object sender, CommandEventArgs args) { try { int Id = 0; int.TryParse(args.CommandName, out Id); bool status = false; bool.TryParse(args.CommandArgument.ToString(), out status); Rol oR = new Rol(); oR.Id = Id; RolMng oRMng = new RolMng(); oRMng.O_Rol = oR; //if (status) // oRMng.dlt(); //else // oRMng.reactive(); oRMng = new RolMng(); oRMng.fillAllLst(); fillCatalog(oRMng.Lst); } catch (Exception e) { ((MstCasc)this.Master).setError = e.Message; } }
private void fillRol() { RolMng oMng = new RolMng(); oMng.fillLst(); chkLstRol.DataSource = oMng.Lst; chkLstRol.DataTextField = "descripcion"; chkLstRol.DataValueField = "nombre"; chkLstRol.DataBind(); }
private void udtRol(Rol oR) { try { RolMng oRMng = new RolMng(); oRMng.O_Rol = oR; oRMng.udt(); } catch { throw; } }
private void istRol(Rol oR) { try { RolMng oRMng = new RolMng(); oRMng.O_Rol = oR; oRMng.add(); } catch { throw; } }
protected void Page_Load(object sender, EventArgs args) { if (!IsPostBack) { try { RolMng oRMng = new RolMng(); oRMng.fillAllLst(); fillCatalog(oRMng.Lst); } catch (Exception e) { ((MstCasc)this.Master).setError = e.Message; } } }
private void fillForm() { int Id = 0; int.TryParse(hfId.Value, out Id); try { RolMng oRMng = new RolMng(); Rol oR = new Rol(); oR.Id = Id; oRMng.O_Rol = oR; oRMng.selById(); txt_nombre.Text = oR.Nombre; } catch { throw; } }