Example #1
0
        public TOTransaction <CtPropoLoad> GetInitialDataCtPropo(int emp_codi)
        {
            DAOGnTipdo daoGnTipDo = new DAOGnTipdo();
            DAOCtPropo daoCtPropo = new DAOCtPropo();
            BOGnItems  boItems    = new BOGnItems();
            BOGnPaise  boPaise    = new BOGnPaise();
            BOGnArbol  boArbol    = new BOGnArbol();
            DAOGnLogo  daoLogo    = new DAOGnLogo();
            BOGnDigfl  boDigfl    = new BOGnDigfl();

            try {
                CtPropoLoad result = new CtPropoLoad();

                List <GnTipdo>   tipdoct = daoGnTipDo.getListGnTipdo();
                List <TOCtCamar> CtCamar = daoCtPropo.GetCtCamar(emp_codi);
                List <GnItem>    tipCont = boItems.GetGnItems(98);
                List <GnPaise>   GnPaise = boPaise.GetGnPaise();
                List <GnArbol>   GnArbol = boArbol.GetGbnArbol(18, emp_codi);
                string           parptda = daoCtPropo.GetPolitica(emp_codi);
                List <GnItem>    CtDtrda = boItems.GetGnItems(342);
                string           parcrpr = daoCtPropo.GetInfoProv(emp_codi);
                GnFlag           digfl   = boDigfl.GetGnDigfl("SGN000008");

                result.tipdoct   = tipdoct;
                result.CtCamar   = CtCamar;
                result.tipCont   = tipCont;
                result.GnPaise   = GnPaise;
                result.GnArbol   = GnArbol;
                result.parptda   = parptda;
                result.CtDtrda   = CtDtrda;
                result.parcrpr   = parcrpr;
                result.empImage  = daoLogo.GetGnLogo(emp_codi).emp_logs;
                result.SGN000008 = digfl.dig_valo;

                return(new TOTransaction <CtPropoLoad>()
                {
                    objTransaction = result, txtRetorno = "", retorno = 0
                });
            }
            catch (Exception ex)
            {
                return(new TOTransaction <CtPropoLoad>()
                {
                    objTransaction = null, retorno = 1, txtRetorno = ex.Message
                });
            }
        }
        public TOTransaction <PqTrazab> GetInitialDataPq(int emp_codi)
        {
            BOGnItems boItems = new BOGnItems();
            BOGnArbol boArbol = new BOGnArbol();
            BOPqDpara boPerte = new BOPqDpara();
            BOGnDigfl boDigfl = new BOGnDigfl();

            try
            {
                PqTrazab result = new PqTrazab();

                List <GnArbol>  seccional = boArbol.GetGbnArbol(2, emp_codi);
                List <GnItem>   formRecib = boItems.GetGnItems(326);
                List <GnItem>   tipoDePqr = boItems.GetGnItems(327);
                List <GnArbol>  areaRespo = boArbol.GetGbnArbol(3, emp_codi);
                List <GnItem>   tipificac = boItems.GetGnItems(330);
                List <GnItem>   subtipifi = boItems.GetGnItems(331);
                List <TOGPerte> pqrGrpups = boPerte.GetPqDpara(emp_codi);
                GnFlag          SPQ000003 = boDigfl.GetGnDigfl("SPQ000003");

                result.seccional = seccional;
                result.formRecib = formRecib;
                result.tipoDePqr = tipoDePqr;
                result.areaRespo = areaRespo;
                result.tipificac = tipificac;
                result.subtipifi = subtipifi;
                result.grupPerte = pqrGrpups;
                result.SPQ000003 = SPQ000003.dig_valo;

                return(new TOTransaction <PqTrazab>()
                {
                    objTransaction = result, txtRetorno = "", retorno = 0
                });
            }
            catch (Exception ex)
            {
                return(new TOTransaction <PqTrazab>()
                {
                    objTransaction = null, retorno = 1, txtRetorno = ex.Message
                });
            }
        }
Example #3
0
        public TOTransaction <GnFlag> getInfoflgTipi()
        {
            BOGnDigfl boFlag = new BOGnDigfl();

            try
            {
                GnFlag spq000003 = boFlag.GetGnDigfl("SPQ000003");
                return(new TOTransaction <GnFlag>()
                {
                    objTransaction = spq000003, retorno = 0, txtRetorno = ""
                });
            }
            catch (Exception ex)
            {
                return(new TOTransaction <GnFlag>()
                {
                    objTransaction = null, retorno = 1, txtRetorno = ex.Message
                });
            }
        }
Example #4
0
        public TOTransaction <PqrTransactionLoad> GetInitialDataWpqinqr(string cli_coda, int emp_codi)
        {
            BOGnPaise  boPaise  = new BOGnPaise();
            BOGnDepar  boDepar  = new BOGnDepar();
            BOGnMunic  boMunic  = new BOGnMunic();
            BOGnItems  boItems  = new BOGnItems();
            BOGnDigfl  boFlag   = new BOGnDigfl();
            BOPqDpara  boPerte  = new BOPqDpara();
            BOGnArbol  boArbol  = new BOGnArbol();
            DAOGnParam daoParam = new DAOGnParam();
            DAOGnLogo  daoLogo  = new DAOGnLogo();
            DAOCtContr daoContr = new DAOCtContr();

            try
            {
                PqrTransactionLoad result    = new PqrTransactionLoad();
                GnParam            param     = daoParam.GetGnParam(emp_codi);
                GnFlag             spq000001 = boFlag.GetGnDigfl("SPQ000001");
                if (param == null)
                {
                    throw new Exception(string.Format("Parámetros de empresa no definidos para empresa {0}", emp_codi));
                }
                List <GnPaise>  countries      = boPaise.GetGnPaise();
                List <GnDepar>  states         = boDepar.GetGnDepar(param.pai_codi);
                List <GnMunic>  cities         = boMunic.GetAllGnMunic(param.pai_codi);
                GnFlag          flag           = boFlag.GetGnDigfl("SPQ000002");
                List <GnItem>   pqrType        = boItems.GetGnItems(327);
                List <GnItem>   pqrSubject     = boItems.GetGnItems(330);
                List <GnItem>   pqrInscription = boItems.GetGnItems(331);
                List <TOGPerte> pqrGrpups      = boPerte.GetPqDpara(emp_codi);
                GnFlag          flag008        = boFlag.GetGnDigfl("SGN000008");

                result.countries      = countries;
                result.states         = states;
                result.cities         = cities;
                result.pqrInscription = pqrInscription;
                result.pqrSubject     = pqrSubject;
                result.pqrType        = pqrType;
                result.pqrGroup       = pqrGrpups;
                result.digiflag       = flag;
                result.pqrImage       = daoLogo.GetGnLogo(emp_codi).emp_logs;
                result.SGN000008      = flag008.dig_valo;

                if (emp_codi > 0 && cli_coda != null && cli_coda != "undefined")
                {
                    FaClien client = DAOFaClien.GetFaClien(emp_codi, cli_coda);
                    if (client == null)
                    {
                        throw new Exception(string.Format("No se encontraron clientes con identificación {0} y empresa {1}", cli_coda, emp_codi));
                    }
                    result.client    = client;
                    result.contracts = daoContr.GetCtContr(emp_codi, cli_coda);
                }
                if (spq000001 != null)
                {
                    result.spq000001 = spq000001;
                }


                return(new TOTransaction <PqrTransactionLoad>()
                {
                    objTransaction = result, txtRetorno = "", retorno = 0
                });
            }
            catch (Exception ex)
            {
                return(new TOTransaction <PqrTransactionLoad>()
                {
                    objTransaction = null, retorno = 1, txtRetorno = ex.Message
                });
            }
        }