public static List <ServiceUnitBillingReportItem> GetAllSUB(RoomSUB roomSUB, ToolSUB toolSUB, StoreSUB storeSUB, out double total) { var allItems = new List <ServiceUnitBillingReportItem>(); allItems.AddRange(roomSUB.CombinedItems); allItems.AddRange(toolSUB.CombinedItems); allItems.AddRange(storeSUB.CombinedItems); total = 0; foreach (var bu in roomSUB.Summaries) { total += bu.MerchandiseAmount; } foreach (var bu in toolSUB.Summaries) { total += bu.MerchandiseAmount; } foreach (var bu in storeSUB.Summaries) { total += bu.MerchandiseAmount; } return(allItems); }
private void ProcessHtmlRoomSUB() { RoomSUB report = GetReportFactory().GetReportRoomSUB(StartPeriod, EndPeriod, GetClientID()); LoadGridSUB(report.Items, report.Summaries); SetLinkText("sub", "room"); }
public RoomSUB GetRoomSUB(DateTime sd, DateTime ed, int id = 0) { RoomSUB report = new RoomSUB { StartPeriod = sd, EndPeriod = ed, ClientID = id }; RoomServiceUnitBillingGenerator.Create(Session, report).Generate(); return(report); }
private void ProcessHtmlAllSUB() { var factory = GetReportFactory(); RoomSUB roomSUB = factory.GetReportRoomSUB(StartPeriod, EndPeriod, GetClientID()); ToolSUB toolSUB = factory.GetReportToolSUB(StartPeriod, EndPeriod, GetClientID()); StoreSUB storeSUB = factory.GetReportStoreSUB(StartPeriod, EndPeriod, false, GetClientID()); IEnumerable <ServiceUnitBillingReportItem> allItems = ReportFactory.GetAllSUB(roomSUB, toolSUB, storeSUB, out double total); gvSUB.Columns[1].Visible = true; gvSUB.Columns[2].Visible = EndPeriod != StartPeriod.AddMonths(1); gvSUB.DataSource = allItems; gvSUB.DataBind(); SetTotalText(total); SetLinkText("sub", "all"); }
private void ProcessExcelRoomSUB() { string filePath; if (StartPeriod >= ReportSettings.July2009) { RoomSUB report = GetReportFactory().GetReportRoomSUB(StartPeriod, EndPeriod, GetClientID()); filePath = GenerateExcelSUB(report.Items, report.Summaries, "Labtime"); } else { BillingUnit summaryUnit = new BillingUnit(); RoomReport mgr = new RoomReport(StartPeriod, EndPeriod); DataTable dtRoom = mgr.GenerateDataTable(summaryUnit); filePath = mgr.GenerateExcelFile(dtRoom); } OutputExcel(filePath); }