Esempio n. 1
0
        public TOTransaction <string> printReport(sfprint forpoPrint)
        {
            try
            {
                string        usu_codi      = ConfigurationManager.AppSettings["usu_codi"].ToString();
                string        reportPublic  = ConfigurationManager.AppSettings["reportPublic"].ToString();
                string        dinamicReport = ConfigurationManager.AppSettings["dinamicReport"].ToString();
                StringBuilder sf            = new StringBuilder();
                string        url           = "";
                string        urlReporte    = ConfigurationManager.AppSettings["UrlReport"];

                List <string> Params = new List <string>();
                Params.Add(forpoPrint.emp_codi.ToString());
                Params.Add(forpoPrint.emp_nomb);
                Params.Add(usu_codi);
                Params.Add("dd/mm/yyyy");
                Params.Add(forpoPrint.dmo_rsmd.ToString()); // DESDE
                Params.Add(forpoPrint.dmo_rsmh.ToString()); // HASTA
                Params.Add(forpoPrint.dmo_fsvs.ToString()); // VALOR SFV
                Params.Add(forpoPrint.dfo_vsol.ToString()); // VALOR SUBSIDIO SOLICITADO

                sf.Append("{SF_FORPO.FOR_CONT} = " + forpoPrint.for_cont);
                sf.Append(" AND {AR_SUCUR.SUC_PRIC} = 'S' ");
                sf.Append(" AND {SF_FORPO.EMP_CODI} = " + forpoPrint.emp_codi);
                sf.Append(" AND {SF_FORPO.FOR_NUME} <> 0 ");

                url = GetURLReporte("SSfForpo", Params, sf.ToString(), urlReporte);
                return(new TOTransaction <string>()
                {
                    objTransaction = url, retorno = 0, txtRetorno = ""
                });
            }
            catch (Exception ex)
            {
                return(new TOTransaction <string>()
                {
                    objTransaction = null, retorno = 1, txtRetorno = ex.Message
                });
            }
        }
        public TOTransaction <string> printCertificado(sfprint forpoPrint)
        {
            BOSfForpo bo = new BOSfForpo();

            return(bo.printReport(forpoPrint));
        }