Esempio n. 1
0
        public List <DingdanGridModel> GetDingdan(DingdanFilterModel model, out int totalCount)
        {
            DingdanFilter filter = new DingdanFilter();

            ClassPropertyHelper.ChangeProperty(filter, model);
            filter.KeywordRegex = RegexHelper.GetRegexList(model.keyword);
            int            skipCount   = model.start;
            List <Dingdan> dingdanList = this._coreManager.DingdanManager.GetDingdan(filter);

            totalCount = dingdanList.Count;
            return(dingdanList.Skip(skipCount).Take(model.size).Select(k => new DingdanGridModel(k)).ToList());
        }
Esempio n. 2
0
        public DingdanListModel GetDingdan(DingdanFilterModel filterModel)
        {
            DingdanListModel listModel = new DingdanListModel();
            DingdanFilter    filter    = new DingdanFilter();

            filter.KeywordRegex = RegexHelper.GetRegexList(filterModel.keyword);
            ClassPropertyHelper.ChangeProperty(filter, filterModel);
            int            skipCount   = filterModel.start;
            List <Dingdan> dingdanList = this._coreManager.DingdanManager.GetDingdan(filter);

            listModel.tichengSum          = dingdanList.Sum(d => d.Ticheng);
            listModel.totalCount          = dingdanList.Count;
            listModel.weishoukuanJineSum  = dingdanList.Sum(d => d.WeishoukuanJine);
            listModel.yingshoukuanJineSum = dingdanList.Sum(d => d.YingshoukuanJine);
            listModel.yishoukuanJineSum   = dingdanList.Sum(d => d.YishoukuanJine);
            listModel.dingdanList         = dingdanList.Skip(skipCount).Take(filterModel.size).Select(k => new DingdanGridModel(k)).ToList();
            return(listModel);
        }