Beispiel #1
0
        public ActionResult HBOLPrintPDF(string HBOL)
        {
            AspPrintPDFOceanExportHBOL model = new AspPrintPDFOceanExportHBOL()
            {
                HBOL = HBOL
            };

            return(View(model));
        }
Beispiel #2
0
        public ActionResult HBOLPrintPDF(AspPrintPDFOceanExportHBOL model)
        {
            string url = string.Empty;

            url = GenerateHBOLPrintUrl(model);

            Stream receiveStream = null;

            ELT.COMMON.Util.ReadFileStream(url, ref receiveStream);
            return(File(receiveStream, "application/pdf", model.HBOL + ".pdf"));
        }
Beispiel #3
0
        private string GenerateHBOLPrintUrl(AspPrintPDFOceanExportHBOL model)
        {
            string url = string.Empty;

            if (model.DocType == "1")
            {
                url = String.Format("/asp/ocean_export/hbol_pdf.asp?hbol={0}&Copy={1}", model.HBOL, model.PDFCopyType);
            }
            else if (model.DocType == "2")
            {
                url = String.Format("/asp/ocean_export/print_rider.asp?vMaster={0}", model.HBOL, model.PDFCopyType);
            }

            return(HttpUtility.UrlEncode(url));
        }