RoleAdd.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 RoleAdd : System.Web.UI.Page
- {
- /// <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("", "RoleAdd");
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- try
- {
- int testNo = 0;
- if (!int.TryParse(PrivNo_TextBox.Text, out testNo))
- {
- throw new Exception("角色序号必须为数字");
- }
- MUP.PrivNo = int.Parse(PrivNo_TextBox.Text);
- MUP.PrivName = PrivName_TextBox.Text;
- MUP.FuncIdStr = "";
- MUP.LeftMenu = "";
- BUP.Add(MUP);
- MessageBox.Show("角色添加成功!", "RoleManager.aspx");
- }
- catch (Exception exp) { MessageBox.Show(exp.Message); }
- }
- }