Exemplo n.º 1
0
        public void Comboboxtree()
        {
            try
            {
                string LeftId = Request["LeftId"];//左边菜单选择
                BllSysFun mybase = new BllSysFun();
                _where += " and Status=" + (int)StatusEnum.正常 + "and TypeID=" + LeftId;
                _mySet = mybase.GetTreeList(_where);

                Output = JsonHelper.ToJson(new FunTreeCommon().GetFunTreeNodes(_mySet));
            }
            catch
            {
                Output = "{{'msg':'','success':false}}";
            }
            WriteJsonToPage(Output);
        }
Exemplo n.º 2
0
 public void InitMain()
 {
     try
     {
         string typeId = (Request["id"] == null ? "0" : Request["id"]);//左边树形类型
         BllSysFun mybase = new BllSysFun();
         _where += " and Status!="+(int)StatusEnum.删除+" and TypeID=" + typeId;
         _mySet = mybase.GetTreeList(_where);
         List<JsonFunTree> list = new FunTreeCommon().GetFunTreeNodes(_mySet);
         Output =JsonHelper.ToJson(list);
     }
     catch
     {
         Output ="";
     }
     WriteJsonToPage(Output);
 }
Exemplo n.º 3
0
        /// <summary>
        ///菜单树,没有权限的菜单
        /// </summary>
        /// <param name="childId"></param>
        /// <param name="master">登录用户对象</param>
        public void InitAdminTree(string childId, ModSysMaster master)
        {
            string output = "";
            string _where = "1=1";

            childId = (childId == "-1" ? "0" : childId);
            //获取
            try
            {
                //获取菜单访问权限
                int att = master.Attribute;
                _where += " and TypeID=" + att;

                BllSysFun mybase = new BllSysFun();

                string name = (Request["FunName"] == null ? "" : Request["FunName"]).Trim(); //查询过滤条件

                _where += (name == "" ? " and Status=" + (int)StatusEnum.正常 : " and Status=" + (int)StatusEnum.正常 + " and FunName like '%" + name.Trim() + "%'");

                DataSet _mySet = mybase.GetTreeList(_where);

                if (name == "")
                {
                    output = JsonHelper.ToJson(new FunTreeCommon().GetFunTreeNodes(_mySet));
                }
                else
                {
                    output = JsonHelper.ToJson(new FunTreeCommon().GetSearchTreeNodes(_mySet));
                }
            }
            catch
            {
                var json = new ModJsonResult();
                json.success   = false;
                json.errorCode = (int)SystemError.正常错误;
                json.msg       = "菜单树异常,无法进行操作";
                output         = JsonHelper.ToJson(json);
            }
            Response.Write(output);
            Response.End();
        }