public ContentResult Search(SearchFilter SearchKey) { SearchKey.OrderBy = string.IsNullOrEmpty(SearchKey.OrderBy) ? "EmployeeCode" : SearchKey.OrderBy; T_COM_Master_EmployeeCollection collection = T_COM_Master_EmployeeManager.Search(SearchKey); return(Content(JsonConvert.SerializeObject(collection), "application/json")); }
/// <summary> /// use for scrolling page /// </summary> /// <returns></returns> public ContentResult GetPg(int page, int pagesize) { string condition = ""; SearchFilter SearchKey = SearchFilter.SearchPG(1, page, pagesize, "EmployeeCode", "EmployeeCode", "Desc", condition); T_COM_Master_EmployeeCollection objItem = T_COM_Master_EmployeeManager.Search(SearchKey); return(Content(JsonConvert.SerializeObject(objItem), "application/json")); }
public JsonResult GetGata([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel) { SearchFilter SearchKey = SearchFilter.SearchData(1, requestModel, "EmployeeCode", "EmployeeCode"); T_COM_Master_EmployeeCollection collection = T_COM_Master_EmployeeManager.Search(SearchKey); int TotalRecord = 0; if (collection.Count > 0) { TotalRecord = collection[0].TotalRecord; } return(Json(new DataTablesResponse(requestModel.Draw, collection, TotalRecord, TotalRecord), JsonRequestBehavior.AllowGet)); }
// GET api/<controller> /// <summary> /// Gets this instance. /// </summary> /// <returns></returns> public T_COM_Master_EmployeeCollection Post(string method, [FromBody] RBVHSearchFilter value) { return(T_COM_Master_EmployeeManager.Search(value)); }