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

            return(View(model));
        }
Example #2
0
        /// <summary>
        /// 根据查询条件获取培训信息配置表分页列表
        /// </summary>
        public async Task <PagedResultDto <T_CInfoListDto> > GetPagedT_CInfosAsync(GetT_CInfoInput input)
        {
            var query = _t_CInfoRepository.GetAll().WhereIf(input.Fk_Item_CInfo_Id >= 1, o => o.Fk_Item_CInfo_Id == input.Fk_Item_CInfo_Id);
            //TODO:根据传入的参数添加过滤条件

            var t_CInfoCount = await query.CountAsync();

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

            var t_CInfoListDtos = t_CInfos.MapTo <List <T_CInfoListDto> >();

            return(new PagedResultDto <T_CInfoListDto>(
                       100,
                       t_CInfoListDtos
                       ));
            //return new JtableResult<List<T_CInfoListDto>>(t_CInfoCount, t_CInfoListDtos);
        }