MyBookShop/BookShop/Admin/EditMenuInfo.aspx.cs

(开头部分) 3KB

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

using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BookShop.Admin
{
    public partial class EditMenuInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["menuid"] == null)
                {
                    Response.Redirect("../Login.aspx", true);
                }
                LoadInfo();
            }
        }
        BLLMenuInfo bll = new BLLMenuInfo();
        public static MenuInfo menu = new MenuInfo();
        /// <summary>
        /// 加载初始化
        /// </summary>
        public void LoadInfo()
        {
            //绑定父级菜单下拉框
            List<MenuInfo> parentList = bll.GetParentList();
            ddlMenuParent.DataSource = parentList;
            ddlMenuParent.DataTextField = "MenuName";
            ddlMenuParent.DataValueField = "ID";
            ddlMenuParent.DataBind();

            if (Request.QueryString["menuid"].ToString() != null)
            {
                int id = int.Parse(Request.QueryString["menuid"].ToString());
                menu = bll.GetEntity(id);
                hdID.Value = menu.ID.ToString();
                txtMenuName.Value = menu.MenuName;
                txtMenuTag.Value = menu.MenuTag;
                txtMenuUrl.Value = menu.MenuUrl;
                if (menu.MenuParent == 0)
                {
                    lblNoParent.Visible = true;
                    ddlMenuParent.Visible = false;
                    lblNoUrl.Visible = true;
                    txtMenuUrl.Visible = false;
                }
                else
                {
                    lblNoParent.Visible = false;
                    ddlMenuParent.Visible = true;
                    lblNoUrl.Visible = false;
                    txtMenuUrl.Visible = true;
                    ddlMenuParent.SelectedValue = menu.MenuParent.ToString();
后面还有 26 行代码,购买后查看完整代码

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

AI 解读 AI

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

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