LeftMenuEdit.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:1k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class LeftMenuEdit : System.Web.UI.Page
- {
- public int User_PrivID = -1;
- public string Functions = "";
- /// <summary>
- /// 模板
- /// </summary>
- Model.User_Priv MUP = new Model.User_Priv();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.User_Priv BUP = new BLL.User_Priv();
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("", "LeftMenuEdit");
- object User_PrivObj = Request.QueryString["id"];
- if (User_PrivObj != null)
- {
- User_PrivID = int.Parse(User_PrivObj.ToString());
- MUP = BUP.GetModel(User_PrivID);
- if (!IsPostBack)
- {
- Label_Pname.Text = MUP.PrivName;
- PrivName_TextBox.Text = MUP.LeftMenu;
- }
- }
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- try
- {
- MUP.ID = User_PrivID;
- MUP.LeftMenu = PrivName_TextBox.Text;
- BUP.Update(MUP);
- MessageBox.Show("角色菜单修改成功!");
- }
- catch (Exception exp)
- {
- MessageBox.Show(exp.Message);
- }
- }
- }