예제 #1
0
        public ContentResult Search(SearchFilter SearchKey)
        {
            SearchKey.OrderBy = string.IsNullOrEmpty(SearchKey.OrderBy) ? "OrgId" : SearchKey.OrderBy;
            T_COm_Master_OrgCollection collection = T_COm_Master_OrgManager.Search(SearchKey);

            return(Content(JsonConvert.SerializeObject(collection), "application/json"));
        }
예제 #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, "OrgId", "OrgId", "Desc", condition);
            T_COm_Master_OrgCollection objItem = T_COm_Master_OrgManager.Search(SearchKey);

            return(Content(JsonConvert.SerializeObject(objItem), "application/json"));
        }
예제 #3
0
        public ActionResult list()
        {
            SearchFilter SearchKey = BindSearch("");

            SearchKey.Keyword = "10001";
            T_COm_Master_OrgCollection collection = T_COm_Master_OrgManager.Search(SearchKey);

            //T_COm_Master_OrgCollection collection = T_COm_Master_OrgManager.GetAll();
            return(View(ViewFolder + "list.cshtml", collection));
        }
예제 #4
0
        public JsonResult GetGata([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel)
        {
            SearchFilter SearchKey = SearchFilter.SearchData(1, requestModel, "OrgId", "OrgId");
            T_COm_Master_OrgCollection collection = T_COm_Master_OrgManager.Search(SearchKey);
            int TotalRecord = 0;

            if (collection.Count > 0)
            {
                TotalRecord = collection[0].TotalRecord;
            }
            return(Json(new DataTablesResponse(requestModel.Draw, collection, TotalRecord, TotalRecord), JsonRequestBehavior.AllowGet));
        }
예제 #5
0
 // GET api/<controller>
 /// <summary>
 /// Gets this instance.
 /// </summary>
 /// <returns></returns>
 public T_COm_Master_OrgCollection Post(string method, [FromBody] SearchFilter value)
 {
     return(T_COm_Master_OrgManager.Search(value));
 }