Exemplo n.º 1
0
        public ActionResult DmMAWBPrintPDF(string DmMAWB)
        {
            AspPrintPDFAirExportDmMAWB model = new AspPrintPDFAirExportDmMAWB()
            {
                ManifestTypeList = GetManifestTypesDmMAWB(DmMAWB), DmMAWB = DmMAWB
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult DmMAWBPrintPDF(AspPrintPDFAirExportDmMAWB model)
        {
            string url = string.Empty;

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

            ELT.COMMON.Util.ReadFileStream(url, ref receiveStream);
            return(File(receiveStream, "application/pdf", model.DmMAWB + ".pdf"));
        }
Exemplo n.º 3
0
        private string GenerateDmMAWBPrintUrl(AspPrintPDFAirExportDmMAWB model)
        {
            string url = string.Empty;

            if (model.DocType == "1")
            {
                url = String.Format("/asp/domestic/mawb_pdf.asp?mawb={0}&Copy={1}", model.DmMAWB, model.PDFCopyType);

                //  url = url);
            }
            else if (model.DocType == "2")
            {
                string AddInfo = "&AddInfo=";
                if (model.IncludeAdditionalInfo)
                {
                    AddInfo = AddInfo + "Y";
                }
                else
                {
                    AddInfo = AddInfo + "N";
                }
                if (model.ManifestType == "All")
                {
                    url = String.Format("/asp/domestic/manifest_pdf.asp?mawb={0}", model.DmMAWB);
                }
                else if (model.ManifestType != "All")
                {
                    url = String.Format("/asp/domestic/manifest_pdf.asp?{0}", model.ManifestType);
                }
                url = url + AddInfo;
                // url = url);
            }
            else if (model.DocType == "3")
            {
                if (model.IACType == "K")
                {
                    url = String.Format("/asp/domestic/iac_unknow_pdf.asp?mawb={0}", model.DmMAWB);
                }
                else
                {
                    url = String.Format("/asp/domestic/iac_pdf.asp?mawb={0}", model.DmMAWB);
                }
            }

            return(HttpUtility.UrlEncode(url));
        }