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);

                Custodia oC = new Custodia();
                oC.Id = Id;
                CustodiaMng oCMng = new CustodiaMng();
                oCMng.O_Custodia = oC;

                if (status)
                {
                    oCMng.dlt();
                }
                else
                {
                    oCMng.reactive();
                }

                oCMng = new CustodiaMng();
                oCMng.fillAllLst();
                fillCatalog(oCMng.Lst);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Example #2
0
        public static void fillCustodia(DropDownList ddlCustodia)
        {
            CustodiaMng oMng = new CustodiaMng();

            oMng.fillLst();
            ddlCustodia.DataSource     = oMng.Lst;
            ddlCustodia.DataTextField  = "nombre";
            ddlCustodia.DataValueField = "id";
            ddlCustodia.DataBind();
        }
Example #3
0
 private void udtCustodia(Custodia oC)
 {
     try
     {
         CustodiaMng oCMng = new CustodiaMng();
         oCMng.O_Custodia = oC;
         oCMng.udt();
     }
     catch
     {
         throw;
     }
 }
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             CustodiaMng oCMng = new CustodiaMng();
             oCMng.fillAllLst();
             fillCatalog(oCMng.Lst);
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Example #5
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                CustodiaMng oCMng = new CustodiaMng();
                Custodia    oC    = new Custodia();
                oC.Id            = Id;
                oCMng.O_Custodia = oC;
                oCMng.selById();

                txt_nombre.Text = oC.Nombre;
            }
            catch
            {
                throw;
            }
        }