⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.aspx.cs

📁 商品管理系统
💻 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("禁止操作权限:A1A2A3A4B1B2B3B4B5B6C1C2C3C4C5D1D2D3D4D5E1E2");
        string MyConnectionString = ConfigurationManager.ConnectionStrings["MySaleDBConnectionString"].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("B6", "是");           
            }


            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("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 + -