public ActionResult SelectedOrderRequests() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <OrderRequestSummary> orders = orderRequestService.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>OR No.</th><th>Project No.</th><th>First Item</th><th>OR Value</th>"; html += "<th>Requestor</th><th>Status</th><th>Status Date</th></tr></thead><tbody>"; int c = 1; foreach (OrderRequestSummary s in orders) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td style='text-align:right;'>{4}</td><td>{5}</td><td>{6}</td><td>{7}</td></tr>", c, s.RefNumber, s.ProjectNum, s.FirstItem, s.TotalValue, s.PrepStaffNames, s.Status, s.StatusDate.ToString("dd/MM/yyyy")); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected Order Requests"); if (orders.Count > 0) { data.Add("{PROJECT_NUMBER}", orders[0].ProjectNum); } else { data.Add("{PROJECT_NUMBER}", ""); } String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-Order-Requests.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }
public ActionResult SelectedPurchaseOrdersPdf() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <PurchaseOrderSummary> purchases = POSvc.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>PO No.</th><th>OR Number</th><th>Supplier</th><th>Delivery Date</th>"; html += "<th>Delivery Address</th><th>PO Value</th><th>Status</th><th>Status Date</th></tr></thead><tbody>"; int c = 1; foreach (PurchaseOrderSummary p in purchases) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td><td>{7}</td><td>{8}</td></tr>", c, p.PONumber, p.OrderRequestRefNumber, p.Supplier, p.DeliveryDate.ToString("dd.MM.yyyy"), p.DeliveryAddress, p.POValue.ToString("#,##0.00"), p.Status, p.StatusDate.ToString("dd/MM/yyyy")); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected Purchase Orders"); String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-Purchase-Requests.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }
public ActionResult SelectedRFPsPdf() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <RequestForPaymentSummary> reqs = request4PaymentSvc.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>RFP No.</th><th>Supplier</th><th>PO No.</th><th>PN</th><th>Currency</th><th>Amount</th>"; html += "<th>Status</th><th>Status Date</th></tr></thead><tbody>"; int c = 1; foreach (RequestForPaymentSummary r in reqs) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td><td>{7}</td><td>{8}</td></tr>", c, r.RFPNo, r.Supplier, r.PONo, r.PN, r.Currency, r.Amount.ToString("#,##0.00"), r.Status, r.StatusDate.ToString("dd/MM/yyyy")); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected Requests for Payment"); String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-General-Template.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }
public ActionResult SelectedCompletedCertsPdf() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <CompletionCertificateSummary> ccerts = ccService.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>CC Ref No.</th><th>PO No.</th><th>Office</th><th>Project Title</th><th>Constructor</th><th>Confirmed By</th><th>Status</th>"; html += "</tr></thead><tbody>"; int c = 1; foreach (CompletionCertificateSummary cf in ccerts) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td><td>{7}</td></tr>", c, cf.RefNumber, cf.PONumber, cf.Office, cf.ProjectTitle, cf.Constructor, cf.ConfirmedBy, cf.Status); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected Completion Certificates"); String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-General-Template.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }
public ActionResult SelectedPPPdf() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <ProcurementPlanSummary> pplans = procPlanSvc.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>Ref No.</th><th>Project Title</th><th>Project No.</th><th>Donor</th><th>Prep Office</th><th>Date Prepared</th>"; html += "</tr></thead><tbody>"; int c = 1; foreach (ProcurementPlanSummary p in pplans) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td></tr>", c, p.RefNumber, p.ProjectTitle, p.ProjectNumber, p.Donor, p.PrepOffice, p.DatePrepared.ToString("dd/MM/yyyy")); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected Pocurement Plans"); String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-General-Template.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }
public ActionResult SelectedInventoryPdf() { string[] _idList = Request.Form["ids"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); if (_idList.Length > 0) { List <Guid> idList = new List <Guid>(); foreach (String i in _idList) { idList.Add(new Guid(i)); } List <GeneralInventorySummary> inventoryItems = inventorySvc.Find(idList); String html = "<table class='summary default black-borders goods-detail'><thead><tr><th>#</th>"; html += "<th>Classification</th><th>Item Name</th>"; html += "<th>Category</th><th>Quantity</th></tr></thead><tbody>"; int c = 1; foreach (GeneralInventorySummary z in inventoryItems) { html += String.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td></tr>", c, z.Classification, z.ItemName, z.Category, z.Quantity); c++; } html += "</tbody></table>"; Dictionary <String, String> data = new Dictionary <string, string>(); data.Add("{DETAILS}", html); data.Add("{REPORT_DATE}", DateTime.Now.ToString("dd.MM.yyyy")); data.Add("{REPORT_TITLE}", "Selected General Inventory Items"); String fileName = WkHtml2Pdf.CreatePersistedReport(data, "Summary-General-Template.htm"); return(Content("/Content/tmp_reports/" + fileName)); } return(Content("#N/A")); }