Пример #1
0
        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;
            }
        }
Пример #2
0
        private void fillRol()
        {
            RolMng oMng = new RolMng();

            oMng.fillLst();
            chkLstRol.DataSource     = oMng.Lst;
            chkLstRol.DataTextField  = "descripcion";
            chkLstRol.DataValueField = "nombre";
            chkLstRol.DataBind();
        }
Пример #3
0
 private void udtRol(Rol oR)
 {
     try
     {
         RolMng oRMng = new RolMng();
         oRMng.O_Rol = oR;
         oRMng.udt();
     }
     catch
     {
         throw;
     }
 }
Пример #4
0
 private void istRol(Rol oR)
 {
     try
     {
         RolMng oRMng = new RolMng();
         oRMng.O_Rol = oR;
         oRMng.add();
     }
     catch
     {
         throw;
     }
 }
Пример #5
0
 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;
         }
     }
 }
Пример #6
0
        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;
            }
        }