コード例 #1
0
ファイル: AnalyseController.cs プロジェクト: leanphon/Mis.Web
        public ActionResult LoadEmployeeSalary()
        {
            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 = EmployeeManager.AnalyseBySalary(queryParam);

            if (or.status != OperateStatus.Success &&
                or.content != null)
            {
                return(Json(or, JsonRequestBehavior.AllowGet));
            }
            //JavaScriptSerializer js = new JavaScriptSerializer();
            //ViewBag.data = js.Serialize(or.data);

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