public IActionResult Grid(FlagTypeSearchModel model) { model = InitializeModel(model); var result = _lookupFacadeApiClient.GetFlagTypes(model).Result; return(PartialView(result)); }
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); }
public async Task <FlagTypeSearchModel> GetFlagTypes(FlagTypeSearchModel model) { return(await _flagTypeApiClient.GetFlagTypes(model)); }
private FlagTypeSearchModel InitializeModel(FlagTypeSearchModel model) { model = InitializeSearchModel(model, "FlagTypeGrid", "Name", "Desc"); return(model); }