Exemple #1
0
        private List <CatGeneralesBE> GetCatGenerales(string sIdCatGenerales = null)
        {
            List <CatGeneralesBE> lstCatGenerales = new List <CatGeneralesBE>();
            CatalogosBR           oCatBus         = new CatalogosBR();
            RespuestaComunBE      RespuestaComun  = new RespuestaComunBE();
            CatGeneralesBE        item            = new CatGeneralesBE();


            item.psIDCATGENERALES = sIdCatGenerales;
            RespuestaComun        = oCatBus.GetCatGenerales(item);

            if (RespuestaComun.itemError.pbFlag)
            {
                if (sIdCatGenerales == null)
                {
                    ViewState["lstCatGenerales"] = RespuestaComun.lstCatGenerales;
                }
                else
                {
                    item.psNOMBRECATALOGO = RespuestaComun.lstCatGenerales[0].psNOMBRECATALOGO.ToString();
                    item.psIDCATALOGO     = RespuestaComun.lstCatGenerales[0].psIDCATALOGO.ToString();
                    item.psFILTRO         = RespuestaComun.lstCatGenerales[0].psFILTRO.ToString();
                    item.psDESCRIPCION    = RespuestaComun.lstCatGenerales[0].psDESCRIPCION.ToString();
                    item.psACTIVO         = RespuestaComun.lstCatGenerales[0].psACTIVO;

                    CatGeneralesWUC.SetCatGenerales(item);
                }
            }
            lstCatGenerales = RespuestaComun.lstCatGenerales;


            return(lstCatGenerales);
        }
Exemple #2
0
        private List <CatalogosBE> GetDdlCatalogos(string sIdCatalogo, bool bEsCatalogo, string sValorFiltro)
        {
            CatalogosBR      oCommonServiceClient = new CatalogosBR();
            RespuestaComunBE Respuesta            = new RespuestaComunBE();

            List <CatalogosBE> lstCatalogos = new List <CatalogosBE>();

            if (sIdCatalogo != "0")
            {
                Respuesta = oCommonServiceClient.GetCatEspecifico(sIdCatalogo, sValorFiltro);
            }
            else
            {
                return(lstCatalogos);
            }

            List <CatalogosBE> lstDdl = new List <CatalogosBE>();
            CatalogosBE        item   = new CatalogosBE();

            if (bEsCatalogo)
            {
                item.ID          = "0";
                item.DESCRIPCION = "Seleccione Opción..";
                lstDdl.Add(item);
            }
            lstDdl.AddRange(Respuesta.lstCatalogo);
            lstCatalogos = lstDdl;

            return(lstCatalogos);
        }
Exemple #3
0
        private void SetDdlCatalogos(DropDownList ddl, string sIdCatalogo, string sValorFiltro = "")
        {
            CatalogosBR      oBus      = new CatalogosBR();
            RespuestaComunBE Respuesta = new RespuestaComunBE();


            if (sIdCatalogo != "0")
            {
                Respuesta = oBus.GetCatEspecifico(sIdCatalogo, sValorFiltro);
            }
            else
            {
                return;
            }

            List <CatalogosBE> lstDdl = new List <CatalogosBE>();
            CatalogosBE        item   = new CatalogosBE();

            item.ID          = "0";
            item.DESCRIPCION = "Seleccione Opción..";

            lstDdl.Add(item);
            lstDdl.AddRange(Respuesta.lstCatalogo);

            ddl.DataSource     = lstDdl;
            ddl.DataValueField = "ID";
            ddl.DataTextField  = "DESCRIPCION";

            ddl.DataBind();
        }
Exemple #4
0
        protected void btnAddCatEspecifico_Click(object sender, EventArgs e)
        {
            CatalogosBR oBus         = new CatalogosBR();
            string      sDescripcion = txtDescripcion.Text.ToUpper();
            string      sIdCatalogo  = ViewState["sIdCatalogo"].ToString();

            oBus.AddCatEspecifico(sIdCatalogo, sDescripcion);


            SetGrid(sIdCatalogo, true);
            RegisterGridpaging();
        }
Exemple #5
0
        private void AddCatGenerales()
        {
            CatalogosBR      oCatBus        = new CatalogosBR();
            RespuestaComunBE RespuestaComun = new RespuestaComunBE();
            CatGeneralesBE   item           = new CatGeneralesBE();

            item = CatGeneralesWUC.GetCatGenerales();

            RespuestaComun = oCatBus.AddCatGenerales(item);



            if (RespuestaComun.itemError.pbFlag)
            {
                SetGrid(true);
            }
        }
Exemple #6
0
        public void SetGrid(string sIdCatalogo, bool bCargaInicial = false)
        {
            List <CatalogosBE> lstCatalogo = new List <CatalogosBE>();

            txtDescripcion.Text      = string.Empty;
            ViewState["sIdCatalogo"] = sIdCatalogo;
            if (bCargaInicial)
            {
                CatalogosBR oBus = new CatalogosBR();

                RespuestaComunBE Respuesta = new RespuestaComunBE();

                Respuesta = oBus.GetCatEspecifico(sIdCatalogo, "");
                ViewState["lstCatalogo"] = Respuesta.lstCatalogo;

                Respuesta = null;
            }

            lstCatalogo = (List <CatalogosBE>)ViewState["lstCatalogo"];
            grdAdmonCatalogos.DataSource = lstCatalogo;
            grdAdmonCatalogos.DataBind();
        }