public ActionResult DmHAWBPrintPDF(string DmHAWB) { AspPrintPDFAirExportDmHAWB model = new AspPrintPDFAirExportDmHAWB() { DmHAWB = DmHAWB }; return(View(model)); }
public ActionResult DmHAWBPrintPDF(AspPrintPDFAirExportDmHAWB model) { string url = string.Empty; model.DmHAWB = Request["DmHAWB"]; url = GenerateDmHAWBPrintUrl(model); Stream receiveStream = null; ELT.COMMON.Util.ReadFileStream(url, ref receiveStream); return(File(receiveStream, "application/pdf", model.DmHAWB + ".pdf")); }
private string GenerateDmHAWBPrintUrl(AspPrintPDFAirExportDmHAWB model) { string url = string.Empty; if (model.DocType == "1") { url = String.Format("/asp/domestic/hawb_pdf.asp?hawb={0}&Copy={1}", model.DmHAWB, model.PDFCopyType); } else if (model.DocType == "2") { url = String.Format("/asp/domestic/print_rider.asp?vMaster={0}", model.DmHAWB, model.PDFCopyType); } return(HttpUtility.UrlEncode(url)); }