public async Task <DetailsFormLookupResponse> GetCaseDetailsFormLookupAsync() { var result = new DetailsFormLookupResponse(); var predicate = new ViewPredicate(); predicate.StartRow = 0; predicate.EndRow = 10000; predicate.Sort = new SortModel(); //case type var condition = new SortCondition { ColumnName = "CaseType", SortType = "Asc" }; predicate.Sort.SortConditions = new List <SortCondition>(); predicate.Sort.SortConditions.Add(condition); var caseTypeResult = await _caseTypeManager.GetAllAsync(new CaseTypeGetAllRequest { Predicate = predicate }); if (caseTypeResult != null && caseTypeResult.Result.Any()) { result.CaseTypes = caseTypeResult.Result; } //Zone Area condition.ColumnName = "[Zone]"; var zoneAreaResult = await _zoneAreaManager.GetAllAsync(new ZoneAreaGetAllRequest { Predicate = predicate }); if (zoneAreaResult != null && zoneAreaResult.Result.Any()) { result.ZoneAreas = zoneAreaResult.Result; } //agency condition.ColumnName = "[Name]"; var agencyResult = await _agencyManager.GetAllAsync(new Common.Request.Agency.AgencyGetAllRequest { Predicate = predicate }); if (agencyResult != null && agencyResult.Result.Any()) { result.Agencies = agencyResult.Result; } //planning office condition.ColumnName = "[Name]"; var planningOfficeResult = await _planningOfficeManager.GetAllAsync(new PlanningOfficeGetAllRequest { Predicate = predicate }); if (planningOfficeResult != null && planningOfficeResult.Result.Any()) { result.PlanningOffices = planningOfficeResult.Result; } return(result); }
public async Task <IActionResult> PlanningOfficeGetAllAsync(PlanningOfficeGetAllRequest req) { var result = await _planningOfficeManager.GetAllAsync(req); return(Ok(result)); }