コード例 #1
0
        public DailyReportDTO GetDailyReport(DateTime date)
        {
            _date = date;
            DailyReportDTO dR = new DailyReportDTO();

            dR.Date = date;

            SearchParam p = new SearchParam();

            p.SearchWithDate = true;
            p.From           = date;
            p.To             = date.AddDays(1);

            List <Item> items = _itemService.AllActiveItems();

            _histories         = _historyService.SearchHistories(p);
            _previousHistories = _historyService.GetItemsHistoryFromOtherPreviousDays(_date);
            _nextHistories     = _historyService.GetItemsHistoryAfterThisDate(_date);

            foreach (var i in items)
            {
                DailyItem d = CreateRow(i);
                _perDays.Add(d);
            }

            dR.Records = _perDays;

            return(dR);
        }
コード例 #2
0
        private void ComputeOutQuantityForEachItems()
        {
            _items = _itemService.AllActiveItems();

            foreach (var item in _items)
            {
                ItemRow row = new ItemRow();
                row.Id       = item.Id;
                row.ItemName = item.Name;

                foreach (var daySection in _range)
                {
                    DailyInOut dInOut = ComputeDailyInOut(daySection, item.Id);
                    row.DailyInOuts.Add(dInOut);
                }

                _itemRows.Add(row);
            }
        }