Пример #1
0
        public IActionResult Grid(FlagTypeSearchModel model)
        {
            model = InitializeModel(model);
            var result = _lookupFacadeApiClient.GetFlagTypes(model).Result;

            return(PartialView(result));
        }
Пример #2
0
        public async Task <FlagTypeSearchModel> GetFlagTypes(FlagTypeSearchModel model)
        {
            var url    = ODataApiUri + "/FlagType?" + 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.FlagTypeSearchResult.Clear();
            model.FlagTypeSearchResult.AddRange(result.Items.Select(item => JsonConvert.DeserializeObject <FlagTypeDto>(item.ToString())));
            return(model);
        }
Пример #3
0
 public async Task <FlagTypeSearchModel> GetFlagTypes(FlagTypeSearchModel model)
 {
     return(await _flagTypeApiClient.GetFlagTypes(model));
 }
Пример #4
0
 private FlagTypeSearchModel InitializeModel(FlagTypeSearchModel model)
 {
     model = InitializeSearchModel(model, "FlagTypeGrid", "Name", "Desc");
     return(model);
 }