コード例 #1
0
        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);
        }
コード例 #2
0
        private void ProcessHtmlRoomSUB()
        {
            RoomSUB report = GetReportFactory().GetReportRoomSUB(StartPeriod, EndPeriod, GetClientID());

            LoadGridSUB(report.Items, report.Summaries);
            SetLinkText("sub", "room");
        }
コード例 #3
0
ファイル: ReportRepository.cs プロジェクト: lurienanofab/lnf
        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);
        }
コード例 #4
0
        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");
        }
コード例 #5
0
        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);
        }