Example #1
0
        private void navigation_validate(HttpContext context)
        {
            string navname  = DTRequest.GetString("param");
            string old_name = DTRequest.GetString("old_name");

            if (string.IsNullOrEmpty(navname))
            {
                context.Response.Write("{ \"info\":\"该导航别名不可为空!\", \"status\":\"n\" }");
                return;
            }
            if (navname.ToLower() == old_name.ToLower())
            {
                context.Response.Write("{ \"info\":\"该导航别名可使用\", \"status\":\"y\" }");
                return;
            }
            //检查保留的名称开头
            if (navname.ToLower().StartsWith("channel_"))
            {
                context.Response.Write("{ \"info\":\"该导航别名系统保留,请更换!\", \"status\":\"n\" }");
                return;
            }
            LingLong.Admin.BLL.navigation bll = new LingLong.Admin.BLL.navigation();
            if (bll.Exists(navname))
            {
                context.Response.Write("{ \"info\":\"该导航别名已被占用,请更换!\", \"status\":\"n\" }");
                return;
            }
            context.Response.Write("{ \"info\":\"该导航别名可使用\", \"status\":\"y\" }");
            return;
        }
Example #2
0
        private void get_navigation_list(HttpContext context)
        {
            LingLong.Admin.Model.manager adminModel = new ManagePage().GetAdminInfo(); //获得当前登录管理员信息
            if (adminModel == null)
            {
                return;
            }
            LingLong.Admin.Model.manager_role roleModel = new LingLong.Admin.BLL.manager_role().GetModel(adminModel.role_id); //获得管理角色信息
            if (roleModel == null)
            {
                return;
            }
            DataTable dt = new LingLong.Admin.BLL.navigation().GetList(0, DTEnums.NavigationEnum.System.ToString());

            this.get_navigation_childs(context, dt, 0, roleModel.role_type, roleModel.manager_role_values);
        }