public IActionResult Grid(AntiSocialBehaviourCaseClosureReasonSearchModel model) { model = InitializeModel(model); var result = _lookupFacadeApiClient.GetAntiSocialBehaviourCaseClosureReasons(model).Result; return(PartialView(result)); }
public async Task <AntiSocialBehaviourCaseClosureReasonSearchModel> GetAntiSocialBehaviourCaseClosureReasons(AntiSocialBehaviourCaseClosureReasonSearchModel model) { return(await _antiSocialBehaviourCaseClosureReasonApiClient.GetAntiSocialBehaviourCaseClosureReasons(model)); }
private AntiSocialBehaviourCaseClosureReasonSearchModel InitializeModel(AntiSocialBehaviourCaseClosureReasonSearchModel model) { model = InitializeSearchModel(model, "AntiSocialBehaviourCaseClosureReasonGrid", "Name", "Desc"); return(model); }
public async Task <AntiSocialBehaviourCaseClosureReasonSearchModel> GetAntiSocialBehaviourCaseClosureReasons(AntiSocialBehaviourCaseClosureReasonSearchModel model) { var url = ODataApiUri + "/AntiSocialBehaviourCaseClosureReason?" + GetFilterStringForLookup(model); var result = await GetOdataResultFromApi(url); var searchResultCount = 0; if (result.Count != null) { int.TryParse(result.Count.ToString(), out searchResultCount); } model.TotalRows = searchResultCount; model.AntiSocialBehaviourCaseClosureReasonSearchResult.Clear(); model.AntiSocialBehaviourCaseClosureReasonSearchResult.AddRange(result.Items.Select(item => JsonConvert.DeserializeObject <AntiSocialBehaviourCaseClosureReasonDto>(item.ToString()))); return(model); }