Ejemplo n.º 1
0
        public JsonResult LoadMenu()
        {
            string nodeid = System.Web.HttpContext.Current.Request.Params["node"];
            string suite  = System.Web.HttpContext.Current.Request.Params["suite"];
            //string functiontree = System.Web.HttpContext.Current.Request.Params["functiontree"];//这个好像是没用了,等等删掉

            //是否控制权限的开关,flag,默认为true,控制权限
            string flagString = System.Web.HttpContext.Current.Request.Params["flag"];
            bool   rightFlag  = true;

            if (flagString == "false")
            {
                rightFlag = false;
            }

            //系统功能树是否懒加载的开关,lazyLoadFlag,默认为true
            string lazyLoadFlagString = System.Web.HttpContext.Current.Request.Params["lazyLoadFlag"];
            bool   lazyLoadFlag       = true;

            if (lazyLoadFlagString == "false")
            {
                lazyLoadFlag = false;
            }

            //按指定SQL语句构建系统功能树
            string treeFilter = System.Web.HttpContext.Current.Request.Params["treeFilter"];
            string userType   = NG3.AppInfoBase.UserType;

            SUP.Common.Base.ProductInfo prdInfo = new SUP.Common.Base.ProductInfo();
            //IList<TreeJSONBase> list = proxy.LoadMenu(prdInfo.ProductCode+prdInfo.Series, suite, false, userType, AppInfoBase.OrgID, AppInfoBase.UserID, nodeid,functiontree,flag);
            IList <TreeJSONBase> list = proxy.LoadMenu(prdInfo.ProductCode + prdInfo.Series, suite, false, userType, AppInfoBase.OrgID, AppInfoBase.UserID, nodeid, rightFlag, lazyLoadFlag, treeFilter);

            return(this.Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public JsonResult Query()
        {
            string condition = System.Web.HttpContext.Current.Request.Params["condition"];

            SUP.Common.Base.ProductInfo prdInfo = new SUP.Common.Base.ProductInfo();
            IList <TreeJSONBase>        list    = proxy.Query(prdInfo.ProductCode + prdInfo.Series, false, "orguser", AppInfoBase.OrgID, AppInfoBase.UserID, condition);

            return(this.Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        //系统功能树

        public JsonResult LoadMenu()
        {
            string nodeid = System.Web.HttpContext.Current.Request.Params["node"];
            string suite  = System.Web.HttpContext.Current.Request.Params["suite"];

            SUP.Common.Base.ProductInfo prdInfo = new SUP.Common.Base.ProductInfo();
            IList <TreeJSONBase>        list    = proxy.LoadMenu(prdInfo.ProductCode + prdInfo.Series, suite, false, "orguser", AppInfoBase.OrgID, AppInfoBase.UserID, nodeid);

            return(this.Json(list, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        public string GetLoadMenu([FromUri] MenuInfoModel param)
        {
            ResultModel result = new ResultModel();

            string nodeid = param.node;
            string suite  = param.suite;

            //是否控制权限的开关,flag,默认为true,控制权限
            string flagString = param.flag;
            bool   rightFlag  = true;

            if (flagString == "false")
            {
                rightFlag = false;
            }


            //系统功能树是否懒加载的开关,lazyLoadFlag,默认为true
            string lazyLoadFlagString = param.lazyLoadFlag;
            bool   lazyLoadFlag       = false;

            if (lazyLoadFlagString == "true")
            {
                lazyLoadFlag = true;
            }

            //按指定SQL语句构建系统功能树
            string treeFilter = param.treeFilter;

            if (string.IsNullOrWhiteSpace(param.orgid))
            {
                return(DCHelper.ErrorMessage("组织id为空!"));
            }

            if (string.IsNullOrWhiteSpace(param.uid))
            {
                return(DCHelper.ErrorMessage("用户id为空!"));
            }

            try
            {
                string userType = NG3.AppInfoBase.UserType;
                SUP.Common.Base.ProductInfo prdInfo = new SUP.Common.Base.ProductInfo();

                DataTable menulist = QTMemoService.GetLoadMenu(prdInfo.ProductCode + prdInfo.Series, suite, false, userType, long.Parse(param.orgid), long.Parse(param.uid), nodeid, rightFlag, lazyLoadFlag, treeFilter);

                return("{\"totalRows\":" + menulist.Rows.Count + ",\"Record\":" + JsonConvert.SerializeObject(menulist) + "}");
                //return DCHelper.ModelListToJson(list, list.Count);
            }
            catch (Exception ex)
            {
                return(DCHelper.ErrorMessage(ex.Message));
            }
        }
Ejemplo n.º 5
0
        public JsonResult Query()
        {
            string condition  = System.Web.HttpContext.Current.Request.Params["condition"];
            string flagString = System.Web.HttpContext.Current.Request.Params["flag"];
            string treeFilter = System.Web.HttpContext.Current.Request.Params["treeFilter"];
            bool   rightFlag  = true;

            if (flagString == "false")
            {
                rightFlag = false;
            }
            string userType = NG3.AppInfoBase.UserType;

            SUP.Common.Base.ProductInfo prdInfo = new SUP.Common.Base.ProductInfo();
            IList <TreeJSONBase>        list    = proxy.Query(prdInfo.ProductCode + prdInfo.Series, false, userType, AppInfoBase.OrgID, AppInfoBase.UserID, condition, rightFlag, treeFilter);

            return(this.Json(list, JsonRequestBehavior.AllowGet));
        }