Ejemplo n.º 1
0
        public IActionResult Grid(TaskStatusSearchModel model)
        {
            model = InitializeModel(model);
            var result = _lookupFacadeApiClient.GetTaskStatuses(model).Result;

            return(PartialView(result));
        }
Ejemplo n.º 2
0
        public async Task <TaskStatusSearchModel> GetTaskStatuses(TaskStatusSearchModel model)
        {
            var url    = ODataApiUri + "/TaskStatus?" + 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.TaskStatusSearchResult.Clear();
            model.TaskStatusSearchResult.AddRange(result.Items.Select(item => JsonConvert.DeserializeObject <TaskStatusDto>(item.ToString())));
            return(model);
        }
Ejemplo n.º 3
0
 private TaskStatusSearchModel InitializeModel(TaskStatusSearchModel model)
 {
     model = InitializeSearchModel(model, "TaskStatusGrid", "Name", "Desc");
     return(model);
 }
Ejemplo n.º 4
0
 public async Task <TaskStatusSearchModel> GetTaskStatuses(TaskStatusSearchModel model)
 {
     return(await _taskStatusApiClient.GetTaskStatuses(model));
 }