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

            return(View(model));
        }
示例#2
0
        /// <summary>
        /// 根据查询条件获取考评内容(档次)分页列表
        /// </summary>
        public async Task <PagedResultDto <T_ContentListDto> > GetPagedT_ContentsAsync(GetT_ContentInput input)
        {
            var query = _t_ContentRepository.GetAll();
            //TODO:根据传入的参数添加过滤条件

            var t_ContentCount = await query.CountAsync();

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

            var t_ContentListDtos = t_Contents.MapTo <List <T_ContentListDto> >();

            return(new PagedResultDto <T_ContentListDto>(
                       t_ContentCount,
                       t_ContentListDtos
                       ));
            // return new JtableResult<List<T_ContentListDto>>(t_ContentCount, t_ContentListDtos);
        }