コード例 #1
0
        public async Task <PagedResultDto <ServiceMoneyList> > ServiceMoneyListPage(ServiceMoneyListIn ServiceMoneyListInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(ServiceMoneyListInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage            = tasksCount / ServiceMoneyListInfo.MaxResultCount;
            var ServiceMoneyListList = await query.PageBy(ServiceMoneyListInfo.SkipTotal, ServiceMoneyListInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <ServiceMoneyList>(tasksCount, ServiceMoneyListList.MapTo <List <ServiceMoneyList> >()));
        }
コード例 #2
0
        public async Task <IList <ServiceMoneyStateList> > ServiceMoneyStateList(ServiceMoneyListIn ServiceMoneyListInfo)
        {
            var ServiceMoneyLists = await _repository.GetAllListAsync(ServiceMoneyListInfo.Expression);

            var query = from a in ServiceMoneyLists
                        select new ServiceMoneyStateList
            {
                DoctorName       = a.DoctorName,
                DoctorID         = a.DoctorID,
                ServiceType      = a.ServiceType,
                ServiceTypeValue = a.ServiceTypeValue,
                ServiceDuration  = a.ServiceDuration,
                ServiceExpense   = a.ServiceExpense,
                ServiceFrequency = a.ServiceFrequency,
                ServiceState     = a.ServiceState,
                ServiceTime      = a.ServiceTime,
                Id           = a.Id,
                CreatedOn    = a.CreatedOn,
                ReceiptState = a.ServiceState,
            };

            return(query.OrderByDescending(t => t.ServiceType).ToList());
        }
コード例 #3
0
        public async Task <IList <ServiceMoneyList> > ServiceMoneyListList(ServiceMoneyListIn ServiceMoneyListInfo)
        {
            var ServiceMoneyLists = await _repository.GetAllListAsync(ServiceMoneyListInfo.Expression);

            return(ServiceMoneyLists.ToList());
        }