SystemManage/ModuleEdit.aspx.cs

(开头部分) 3KB

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

using System;
using System.Web.UI;

public partial class SystemManage_ModuleEdit : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["roleid"] != null)
        {
            Authority myauthority = new Authority();
            int RoleID = Convert.ToInt16(Server.HtmlEncode(Request.Cookies["roleid"].Value));
            int ModuleID = 4;
            if (myauthority.QXExists(RoleID, ModuleID))
            {
                if (!IsPostBack)
                {
                    Module mymodule = new Module();
                    mymodule.GetModel(Convert.ToInt16(Request.QueryString["id"].ToString()));
                    this.txtName.Text = mymodule.ModuleName;
                    this.txtDescription.Text = mymodule.ModuleDescription;
                    this.txtURL.Text = mymodule.ModuleURL;
                    this.txtNum.Text = mymodule.ModuleNum.ToString();
                    if (mymodule.ModuleFatherID == 0)
                    {
                        this.rab_genyes.Checked = true;
                    }
                    else
                    {
                        this.rab_genno.Checked = true;
                        this.panel_genno.Visible = true;
                        this.drpl_gen.SelectedValue = mymodule.ModuleFatherID.ToString();
                    }
                }

            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "对不起!您无权操作此版块。", "../Main.aspx");
            }
        }
        else
        {
            MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
        } 
        
    }

    protected void butAdd_Click(object sender, ImageClickEventArgs e)
    {
        Module mymodule = new Module();
        mymodule.ModuleID = Convert.ToInt16(Request.QueryString["id"].ToString());
        mymodule.ModuleName = this.txtName.Text;
        mymodule.ModuleDescription = this.txtDescription.Text;
        if (this.rab_genno.Checked == true)
        {
            mymodule.ModuleFatherID = Convert.ToInt16(this.drpl_gen.SelectedValue);
        }
        else
        {
后面还有 35 行代码,购买后查看完整代码

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

AI 解读 AI

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

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