📄 role.aspx.cs
字号:
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;
using es_business = com.egt.business;
public partial class popedom_role : System.Web.UI.Page
{
private es_business.role rl = new com.egt.business.role();
private es_business.RoleAttribute roatt = new com.egt.business.RoleAttribute();
private DataTable dt;
private DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ds = rl.select_popedom();
if (ds != null)
{
this.grvpopedom.DataSource = ds.Tables[0];
this.grvpopedom.DataBind();
}
else
{
this.grvpopedom.DataSource = null;
this.grvpopedom.DataBind();
}
}
}
protected void btn_refer_Click(object sender, EventArgs e)
{
if (this.HdnSelectedValues.Value != "")
{
roatt.names = this.txt_role.Text;
string choose = this.HdnSelectedValues.Value;
string[] chooess = choose.Split(',');
int i = rl.new_role(roatt, chooess);
if (i == 1)
{
Response.Write("<script language=javascript>window.alert('添加成功');</script>");
}
else
{
Response.Write("<script language=javascript>window.alert('添加失败');</script>");
}
}
else
{
Response.Write("<script language=javascript>window.alert('请选择角色权限');</script>");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -