Example #1
0
        public ActionResult Index()
        {
            var model = new GetT_GradeInput {
                FilterText = Request.QueryString["filterText"]
            };

            return(View(model));
        }
Example #2
0
        /// <summary>
        /// 根据查询条件获取考评等级分页列表
        /// </summary>
        public async Task <PagedResultDto <T_GradeListDto> > GetPagedT_GradesAsync(GetT_GradeInput input)
        {
            var query = _t_GradeRepository.GetAll();
            //TODO:根据传入的参数添加过滤条件

            var t_GradeCount = await query.CountAsync();

            var t_Grades = await query
                           .OrderBy(input.Sorting)
                           .PageBy(input)
                           .ToListAsync();

            var t_GradeListDtos = t_Grades.MapTo <List <T_GradeListDto> >();

            return(new PagedResultDto <T_GradeListDto>(
                       t_GradeCount,
                       t_GradeListDtos
                       ));
            //return new JtableResult<List<T_GradeListDto>>(t_GradeCount, t_GradeListDtos);
        }