コード例 #1
0
ファイル: ICreditoPyme.cs プロジェクト: JohnYsaac10/app-test
        public string ProcesarPdfIva(ref DatosClientePy dataCliente, HttpRequestBase request, out string codigoError, out string mensajeError)
        {
            string mes  = "";
            var    text = request.ExtractTextFromPdf(out mes, out codigoError, out mensajeError);

            if (codigoError != "200")
            {
                return(null);
            }

            if (dataCliente.IvaVentaMes == null)
            {
                dataCliente.IvaVentaMes = new IvaVentasMeses();
            }

            var doc = request.Files.AllKeys[0].Split('-')[0];
            //string cleanedText = Regex.Replace(text.ToString(), @"http[^\s]+", "");

            string codeError = "", mensaje = "", totalVentasMes = "";

            try
            {
                totalVentasMes = _ServicioRatingEmpresarial.ProcesarPDFDeclaracionIVA(dataCliente.Cedula.Trim() + "001", mes, text.ToString(), DateTime.Now.ToString("yyyy/MM/dd"), ref codeError, ref mensaje);
            }
            catch (Exception)
            {
                codigoError = "503";
                return(null);
            }

            if (codeError != "000")
            {
                codigoError  = "400";
                mensajeError = mensaje;
            }
            else
            {
                codigoError  = "200";
                mensajeError = "subido correctamente";
            }

            if (doc == "documento1")
            {
                dataCliente.IvaVentaMes.Mes1 = totalVentasMes;
            }
            if (doc == "documento2")
            {
                dataCliente.IvaVentaMes.Mes2 = totalVentasMes;
            }
            if (doc == "documento3")
            {
                dataCliente.IvaVentaMes.Mes3 = totalVentasMes;
            }

            return("");
        }
コード例 #2
0
ファイル: ICreditoPyme.cs プロジェクト: JohnYsaac10/app-test
        public string ProcesarPdfSRI(DatosClientePy dataCliente, HttpRequestBase request, out string codigoError, out string mensajeError)
        {
            string anyo = "";
            var    text = request.ExtractTextFromPdf(out anyo, out codigoError, out mensajeError);

            if (codigoError != "200")
            {
                return(null);
            }

            //string cleanedText = Regex.Replace(text.ToString(), @"http[^\s]+", "");

            string codeError = "", mensaje = "";

            try
            {
                var rekujwssp = _ServicioRatingEmpresarial.ProcesarPDFImpuestoRenta(dataCliente.Cedula.Trim() + "001", anyo, text.ToString(), dataCliente.idProceso, dataCliente.fechaRevision, "usuarioWeb", ref codeError, ref mensaje);
            }
            catch (Exception e)
            {
                var r = e.Message;
                codigoError = "503";
                return(null);
            }

            if (codeError != "000")
            {
                codigoError  = "400";
                mensajeError = mensaje;
            }
            else
            {
                codigoError  = "200";
                mensajeError = "subido correctamente";
            }

            return("");
        }