public ActionResult Index() { var model = new GetT_HClassInput { FilterText = Request.QueryString["filterText"] }; return(View(model)); }
/// <summary> /// 根据查询条件获取培训班人员信息表分页列表 /// </summary> public async Task <PagedResultDto <T_HClassListDto> > GetPagedT_HClasssAsync(GetT_HClassInput input) { var query = _t_HClassRepository.GetAll().WhereIf(input.FK_ClassId >= 1, o => o.FK_HClass_ClassId == input.FK_ClassId). WhereIf(!string.IsNullOrWhiteSpace(input.FilterText), o => o.UserName.Contains(input.FilterText)); //TODO:根据传入的参数添加过滤条件 var t_HClassCount = await query.CountAsync(); var t_HClasss = await query .OrderBy(input.Sorting) //.PageBy(input) .ToListAsync(); var t_HClassListDtos = t_HClasss.MapTo <List <T_HClassListDto> >(); return(new PagedResultDto <T_HClassListDto>( 200, t_HClassListDtos )); // return new JtableResult<List<T_HClassListDto>>(t_HClassCount, t_HClassListDtos); }