📄 login.aspx.cs
字号:
//文件名:Login.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 System.Data.SqlClient;
public partial class System_Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Login1_LoggedIn(object sender, EventArgs e)
{
Session["MyUserName"] = this.Login1.UserName;
System.Text.StringBuilder MyForbidString = new System.Text.StringBuilder();
MyForbidString.Append("禁止操作权限:A1A2A3B1B2B3B4C1C2C3C4D1D2D3D4D5E1E2");
string MyConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; ;
string MySQL = "Select * From 操作用户 Where 用户名称='" + this.Login1.UserName + "'";
SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
DataTable MyTable = new DataTable();
MyAdapter.Fill(MyTable);
if (MyTable.Rows.Count > 0)
{
if ((int)MyTable.Rows[0]["资料管理之房源字典设置"] == 1)
{
MyForbidString.Replace("A1", "是");
}
if ((int)MyTable.Rows[0]["资料管理之公司职员设置"] == 1)
{
MyForbidString.Replace("A2", "是");
}
if ((int)MyTable.Rows[0]["资料管理之业务资料管理"] == 1)
{
MyForbidString.Replace("A3", "是");
}
if ((int)MyTable.Rows[0]["房源管理之出售房源管理"] == 1)
{
MyForbidString.Replace("B1", "是");
}
if ((int)MyTable.Rows[0]["房源管理之出租房源管理"] == 1)
{
MyForbidString.Replace("B2", "是");
}
if ((int)MyTable.Rows[0]["房源管理之查询可售房源"] == 1)
{
MyForbidString.Replace("B3", "是");
}
if ((int)MyTable.Rows[0]["房源管理之查询可租房源"] == 1)
{
MyForbidString.Replace("B4", "是");
}
if ((int)MyTable.Rows[0]["客源管理之求购客源管理"] == 1)
{
MyForbidString.Replace("C1", "是");
}
if ((int)MyTable.Rows[0]["客源管理之求租客源管理"] == 1)
{
MyForbidString.Replace("C2", "是");
}
if ((int)MyTable.Rows[0]["客源管理之查询求购客源"] == 1)
{
MyForbidString.Replace("C3", "是");
}
if ((int)MyTable.Rows[0]["客源管理之查询求租客源"] == 1)
{
MyForbidString.Replace("C4", "是");
}
if ((int)MyTable.Rows[0]["成交管理之广告发布管理"] == 1)
{
MyForbidString.Replace("D1", "是");
}
if ((int)MyTable.Rows[0]["成交管理之经纪跟进管理"] == 1)
{
MyForbidString.Replace("D2", "是");
}
if ((int)MyTable.Rows[0]["成交管理之租售成交管理"] == 1)
{
MyForbidString.Replace("D3", "是");
}
if ((int)MyTable.Rows[0]["成交管理之查询售房信息"] == 1)
{
MyForbidString.Replace("D4", "是");
}
if ((int)MyTable.Rows[0]["成交管理之查询租房信息"] == 1)
{
MyForbidString.Replace("D5", "是");
}
if ((int)MyTable.Rows[0]["系统管理之分配用户权限"] == 1)
{
MyForbidString.Replace("E1", "是");
}
if ((int)MyTable.Rows[0]["系统管理之公司信息设置"] == 1)
{
MyForbidString.Replace("E2", "是");
}
Session["MyForbid"] = MyForbidString;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -