Beispiel #1
0
        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="httpContext"></param>
        public void AddMenu(HttpContext httpContext)
        {
            var customMenu = new Model.CustomMenu();
            var customMenuDal = new CustomMenuDal();
            var hashTable = new Hashtable();
            var pid = httpContext.Request.Params["pid"];
            var type = httpContext.Request.Params["type"];
            var name = httpContext.Request.Params["name"];
            var nkey = httpContext.Request.Params["nkey"];
            var nurl = httpContext.Request.Params["nurl"];

            customMenu.Id = nkey;
            customMenu.Name = name;
            customMenu.Nkey = nkey;
            customMenu.Pid = pid;
            customMenu.Type = type;
            customMenu.Url = nurl;

            customMenuDal.Add(customMenu);

            hashTable["isSuccess"] = true;
            hashTable["jsMethod"] = "ajax_AddMenu";
            var json = _jss.Serialize(hashTable);
            httpContext.Response.Write(json);
        }