Project.WebUi/SystemManage/MenuEdit.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Project.Bll;
using Project.Model;
using Project.Common;
using System.Collections.Generic;
using Project.WebUi.App_Code;

namespace Project.WebUi.SystemManage
{
    public partial class MenuEdit : MyBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindMenu();
                ShowData();
            }
        }

        protected void ShowData()
        {
            string id = Request["MenuId"];
            if (!string.IsNullOrEmpty(id))
            {
                UserMenuBll bll = new UserMenuBll();
                UserMenu model = bll.GetModel(Convert.ToInt32(id));
                if (model != null)
                {
                    this.txtMenuName.Text = model.MenuName;
                    this.txtMenuAddress.Text = model.MenuAddress;
                    this.txtMenuOrder.Text = model.MenuOrder.ToString();
                    this.rdoList.SelectedValue = model.IsNavigation.ToString();
                    if (model.ParentId == 0)
                        this.ddlParent.Enabled = false;
                    else
                        this.ddlParent.SelectedValue = model.ParentId.ToString();
                }
            }
        }

        //绑定顶级菜单
        protected void BindMenu()
        {
            UserMenuBll bll = new UserMenuBll();
            List<UserMenu> list = bll.GetTopList();
            if (list != null)
            {
                this.ddlParent.DataSource = list;
                this.ddlParent.DataTextField = "MenuName";
                this.ddlParent.DataValueField = "MenuId";
后面还有 43 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。