Esempio n. 1
0
        public IActionResult Grid(AntiSocialBehaviourCaseClosureReasonSearchModel model)
        {
            model = InitializeModel(model);
            var result = _lookupFacadeApiClient.GetAntiSocialBehaviourCaseClosureReasons(model).Result;

            return(PartialView(result));
        }
Esempio n. 2
0
 public async Task <AntiSocialBehaviourCaseClosureReasonSearchModel> GetAntiSocialBehaviourCaseClosureReasons(AntiSocialBehaviourCaseClosureReasonSearchModel model)
 {
     return(await _antiSocialBehaviourCaseClosureReasonApiClient.GetAntiSocialBehaviourCaseClosureReasons(model));
 }
Esempio n. 3
0
 private AntiSocialBehaviourCaseClosureReasonSearchModel InitializeModel(AntiSocialBehaviourCaseClosureReasonSearchModel model)
 {
     model = InitializeSearchModel(model, "AntiSocialBehaviourCaseClosureReasonGrid", "Name", "Desc");
     return(model);
 }
Esempio n. 4
0
        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);
        }