📄 login.aspx.vb
字号:
'文件名:Login.aspx.vb
Imports System.Data.SqlClient
Partial Class SystemManage_Login
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Page.Title = "当前位置:系统管理->登录管理系统"
End Sub
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login1.LoggedIn
Session("MyUserName") = Me.Login1.UserName
Dim MyForbidString As New System.Text.StringBuilder()
MyForbidString.Append("禁止操作权限:A1A2A3A4A5A6A7B1B2B3C1C2C3C4C5D1D2D3D4D5E1E2E3E4")
Dim MyConnectionString As String = ConfigurationManager.ConnectionStrings("MyHotelDBConnectionString").ConnectionString
Dim MySQL As String = "Select * From 操作用户 Where 用户名称='" + Me.Login1.UserName + "'"
Dim MyAdapter As New SqlDataAdapter(MySQL, MyConnectionString)
Dim MyTable As New System.Data.DataTable()
MyAdapter.Fill(MyTable)
If (MyTable.Rows.Count > 0) Then
If (MyTable.Rows(0)("客房管理之旅客入住登记") = 1) Then
MyForbidString.Replace("A1", "是")
End If
If (MyTable.Rows(0)("客房管理之旅客换房登记") = 1) Then
MyForbidString.Replace("A2", "是")
End If
If (MyTable.Rows(0)("客房管理之旅客结账退房") = 1) Then
MyForbidString.Replace("A3", "是")
End If
If (MyTable.Rows(0)("客房管理之旅客预订登记") = 1) Then
MyForbidString.Replace("A4", "是")
End If
If (MyTable.Rows(0)(9) = 1) Then
MyForbidString.Replace("A5", "是")
End If
If (MyTable.Rows(0)("客房管理之旅客补交押金") = 1) Then
MyForbidString.Replace("A6", "是")
End If
If (MyTable.Rows(0)("客房管理之打印旅客账单") = 1) Then
MyForbidString.Replace("A7", "是")
End If
If (MyTable.Rows(0)("消费管理之旅客餐费登记") = 1) Then
MyForbidString.Replace("B1", "是")
End If
If (MyTable.Rows(0)("消费管理之旅客话费登记") = 1) Then
MyForbidString.Replace("B2", "是")
End If
If (MyTable.Rows(0)("消费管理之其他消费登记") = 1) Then
MyForbidString.Replace("B3", "是")
End If
If (MyTable.Rows(0)("查询管理之查询旅客信息") = 1) Then
MyForbidString.Replace("C1", "是")
End If
If (MyTable.Rows(0)("查询管理之查询客房信息") = 1) Then
MyForbidString.Replace("C2", "是")
End If
If (MyTable.Rows(0)("查询管理之查询商品消耗") = 1) Then
MyForbidString.Replace("C3", "是")
End If
If (MyTable.Rows(0)("查询管理之查询消耗总量") = 1) Then
MyForbidString.Replace("C4", "是")
End If
If (MyTable.Rows(0)("查询管理之查询旅客押金") = 1) Then
MyForbidString.Replace("C5", "是")
End If
If (MyTable.Rows(0)("报表管理之客房入住报表") = 1) Then
MyForbidString.Replace("D1", "是")
End If
If (MyTable.Rows(0)("报表管理之餐饮消费报表") = 1) Then
MyForbidString.Replace("D2", "是")
End If
If (MyTable.Rows(0)("报表管理之其他消费报表") = 1) Then
MyForbidString.Replace("D3", "是")
End If
If (MyTable.Rows(0)("报表管理之电话消费报表") = 1) Then
MyForbidString.Replace("D4", "是")
End If
If (MyTable.Rows(0)("报表管理之旅客结账报表") = 1) Then
MyForbidString.Replace("D5", "是")
End If
If (MyTable.Rows(0)("系统管理之分配用户权限") = 1) Then
MyForbidString.Replace("E1", "是")
End If
If (MyTable.Rows(0)("系统管理之酒店信息设置") = 1) Then
MyForbidString.Replace("E2", "是")
End If
If (MyTable.Rows(0)("系统管理之酒店房间设置") = 1) Then
MyForbidString.Replace("E3", "是")
End If
If (MyTable.Rows(0)("系统管理之酒店商品设置") = 1) Then
MyForbidString.Replace("E4", "是")
End If
Session("MyForbid") = MyForbidString
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -