示例#1
0
        public ActionResult LoadLeaveWarning()
        {
            QueryParam queryParam = new QueryParam();

            var extendParams = Request.Params["extendParams"];

            if (extendParams != null)
            {
                JavaScriptSerializer             js        = new JavaScriptSerializer();
                List <FilterModel>               filters   = js.Deserialize <List <FilterModel> >(extendParams);
                Dictionary <string, FilterModel> filterSet = filters.ToDictionary(key => key.key, model => model);

                queryParam.filters = filterSet;
            }

            OperateResult or = LeaveManager.LeaveWarningByPager(queryParam);

            if (or.status == OperateStatus.Success &&
                or.data != null)
            {
                return(Json(or.data, JsonRequestBehavior.AllowGet));
            }

            return(Json(or, JsonRequestBehavior.AllowGet));
        }