Example #1
0
        public ActionResult MBOLPrintPDF(string MBOL)
        {
            AspPrintPDFOceanExportMBOL model = new AspPrintPDFOceanExportMBOL()
            {
                ManifestTypeList = GetManifestTypesMAWB(MBOL), MBOL = MBOL
            };

            return(View(model));
        }
Example #2
0
        public ActionResult MBOLPrintPDF(AspPrintPDFOceanExportMBOL model)
        {
            string url = string.Empty;

            url = GenerateMBOLPrintUrl(model);
            Stream receiveStream = null;

            ELT.COMMON.Util.ReadFileStream(url, ref receiveStream);
            return(File(receiveStream, "application/pdf", model.MBOL + ".pdf"));
        }
Example #3
0
        private string GenerateMBOLPrintUrl(AspPrintPDFOceanExportMBOL model)
        {
            string url = string.Empty;

            if (model.DocType == "1")
            {
                url = String.Format("/asp/ocean_export/bol_instruction.asp?BookingNum={0}", model.MBOL, model.PDFCopyType);
            }
            else if (model.DocType == "2")
            {
                if (model.ManifestType == "All")
                {
                    url = String.Format("/asp/ocean_export/manifest_pdf.asp?MBOL={0}", model.MBOL);
                }
                else if (model.ManifestType != "All")
                {
                    url = String.Format("/asp/ocean_export/manifest_pdf.asp?{0}", model.ManifestType);
                }
            }

            return(HttpUtility.UrlEncode(url));
        }