public ActionResult GenerateInvoice(string bilDoc) { RunPrintBillingsDTO serviceModel; try { serviceModel = WCFClientManager.SAPServiceClient.GetBillingsToPrintTotal(UserManagementHelper.GetSessionId(), bilDoc) as RunPrintBillingsDTO; } catch (Exception ex) { ErrorSignal.FromCurrentContext().Raise(ex); return(RedirectToAction("Index", "Error")); } ReportInvoiceViewModel invoiceViewModel = BillingReportingHelper.GenerateInvoiceViewModel(serviceModel); HeaderInvoice(bilDoc); return(GenerateInvoicePdf(invoiceViewModel, bilDoc)); }
public ActionResult DetailSubMaterialDescription() { RunPrintBillingsDTO serviceModel = null; try { serviceModel = WCFClientManager.SAPServiceClient.GetBillingsToPrint(UserManagementHelper.GetSessionId(), "1960007091") as RunPrintBillingsDTO; } catch (Exception) { var mockedServiceModel = BillingReportingHelper.GenerateMockedInvoiceDetailViewModel(); var mock = BillingReportingHelper.GenerateInvoiceViewModel(mockedServiceModel); return(View(mock)); } var viewModel = BillingReportingHelper.GenerateInvoiceViewModel(serviceModel); return(View(viewModel)); //return RedirectToAction("GenerateInvoice"); }