Beispiel #1
0
        public DistrictComplainDateView QueryLastDateStat(DateTime initialDate)
        {
            var stats = _repository.QueryBeginDate(initialDate.Date,
                                                   (repository, beginDate, endDate) => _repository.GetAllList(beginDate, endDate)).ToList();

            if (!stats.Any())
            {
                return new DistrictComplainDateView
                       {
                           StatDate = initialDate.Date,
                           DistrictComplainViews = new List <DistrictComplainView>()
                       }
            }
            ;
            return(DistrictComplainDateView.GenerateDistrictComplainDateView(stats, _townRepository.GetFoshanDistricts()));
        }