login.aspx.cs

来自「小区物业管理系统源代码,密码:123456,」· CS 代码 · 共 128 行

CS
128
字号
//文件名: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("禁止操作权限:A1A2A3A4B1B2B3B4B5C1C2C3C4C5C6C7D1D2D3D4D5E1E2");
        string MyConnectionString = ConfigurationManager.ConnectionStrings["MyCommunityDBConnectionString"].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("A4", "是");
            }
            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("B5", "是");
            }
            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("C5", "是");
            }
            if ((int)MyTable.Rows[0]["费用管理之物管费用交纳"] == 1)
            {
                MyForbidString.Replace("C6", "是");
            }
            if ((int)MyTable.Rows[0]["费用管理之其他费用交纳"] == 1)
            {
                MyForbidString.Replace("C7", "是");
            }
            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 + =
减小字号Ctrl + -
显示快捷键?