public IHttpActionResult PostQuery(JObject jsonData) { TransferObj <PagedObj <NHACUNGCAP> > result = new TransferObj <PagedObj <NHACUNGCAP> >(); var postData = ((dynamic)jsonData); var filtered = ((JObject)postData.filtered).ToObject <FilterObj <NhaCungCapViewModel.Search> >(); var paged = ((JObject)postData.paged).ToObject <PagedObj <NHACUNGCAP> >(); var unitCode = string.IsNullOrEmpty(filtered.PARENT_UNITCODE) ? filtered.UNITCODE : filtered.PARENT_UNITCODE; try { PagedObj <NHACUNGCAP> tempData = _service.QueryPageNhaCungCap(_service.GetConnectionString(), paged, filtered.Summary, unitCode); result.Data = tempData; result.Status = true; return(Ok(result)); } catch (Exception ex) { return(InternalServerError()); } }