Exemplo n.º 1
0
        public ContentResult Search(SearchFilter SearchKey)
        {
            SearchKey.OrderBy = string.IsNullOrEmpty(SearchKey.OrderBy) ? "WorkingId" : SearchKey.OrderBy;
            T_CMS_InterfaceLacviet_WorkingHoursCollection collection = T_CMS_InterfaceLacviet_WorkingHoursManager.Search(SearchKey);

            return(Content(JsonConvert.SerializeObject(collection), "application/json"));
        }
Exemplo n.º 2
0
        /// <summary>
        /// use for scrolling page
        /// </summary>
        /// <returns></returns>
        public ContentResult GetPg(int page, int pagesize)
        {
            string       condition = "";
            SearchFilter SearchKey = SearchFilter.SearchPG(1, page, pagesize, "WorkingId", "WorkingId", "Desc", condition);
            T_CMS_InterfaceLacviet_WorkingHoursCollection objItem = T_CMS_InterfaceLacviet_WorkingHoursManager.Search(SearchKey);

            return(Content(JsonConvert.SerializeObject(objItem), "application/json"));
        }
Exemplo n.º 3
0
        public JsonResult GetGata([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel)
        {
            SearchFilter SearchKey = SearchFilter.SearchData(1, requestModel, "WorkingId", "WorkingId");
            T_CMS_InterfaceLacviet_WorkingHoursCollection collection = T_CMS_InterfaceLacviet_WorkingHoursManager.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_CMS_InterfaceLacviet_WorkingHoursCollection Post(string method, [FromBody] SearchFilter value)
 {
     return(T_CMS_InterfaceLacviet_WorkingHoursManager.Search(value));
 }