public ActionResult Index() { var model = new GetT_RequireInput { FilterText = Request.QueryString["filterText"] }; return(View(model)); }
public async Task <FileDto> GetT_RequireToExcel(GetT_RequireInput input) { var auditLogs = await _t_RequireRepository.GetAll().WhereIf(input.Fk_Item_Require_Id >= 1, o => o.Fk_Item_Require_Id == input.Fk_Item_Require_Id) .AsNoTracking() .OrderByDescending(al => al.SubmitTime) .ToListAsync(); // var auditLogListDtos = ConvertToAuditLogListDtos(auditLogs); return(excelExporter.ExportToFile(auditLogs.MapTo <List <T_RequireListDto> >())); }
/// <summary> /// 根据查询条件获取培训需求提报分页列表 /// </summary> public async Task <PagedResultDto <T_RequireListDto> > GetPagedT_RequiresAsync(GetT_RequireInput input) { var query = _t_RequireRepository.GetAll().WhereIf(input.Fk_Item_Require_Id >= 1, _ => _.Fk_Item_Require_Id == input.Fk_Item_Require_Id); //TODO:根据传入的参数添加过滤条件 var t_RequireCount = await query.CountAsync(); var t_Requires = await query .OrderBy(input.Sorting) .PageBy(input) .ToListAsync(); var t_RequireListDtos = t_Requires.MapTo <List <T_RequireListDto> >(); return(new PagedResultDto <T_RequireListDto>( t_RequireCount, t_RequireListDtos )); // return new JtableResult<List<T_RequireListDto>>(t_RequireCount, t_RequireListDtos); }