コード例 #1
0
        public ActionResult Form(string id)
        {
            ViewBag.Id = id;
            var menuList = _menuApp.GetMenuList();

            menuList.Insert(0, new sys_menu()
            {
                id = "", menu_name = "请选择"
            });
            ViewBag.MenuSel = new SelectList(menuList, "id", "menu_name");

            return(View());
        }
コード例 #2
0
        public ActionResult Form(string id)
        {
            ViewBag.Id = id;
            var menuList = _menuApp.GetMenuList().Where(s => s.menu_type == 0).OrderBy(s => s.menu_level).ToList();

            menuList.Insert(0, new sys_menu()
            {
                id = 0, menu_name = "请选择"
            });
            ViewBag.MenuSel = new SelectList(menuList, "id", "menu_name");

            //按钮
            //var funcSelList = _menuApp.GetFuncSelList();
            //funcSelList.Insert(0, new sys_operate(){ id = 0, func_cname = "请选择" });
            //ViewBag.FuncSel = new SelectList(funcSelList, "id", "func_cname");
            return(View());
        }
コード例 #3
0
        public ActionResult GetData()
        {
            var data = _menuApp.GetMenuList();

            return(JsonEx(data));
        }