📄 roomstatusform.aspx.vb
字号:
'文件名:RoomStatusForm.aspx.vb
Partial Class QueryManage_RoomStatusForm
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim MyForbidString As String = Session("MyForbid").ToString()
If (MyForbidString.IndexOf("C2") > 1) Then
Server.Transfer("~/SystemManage/AllErrorHelp.aspx")
End If
Me.Page.Title = "当前位置:查询管理->查询客房信息"
Me.Label1.Text = Session("MyCompanyName").ToString() + "客房当前入住状态图"
End Sub
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
'设置有客人入住的房号单元格背景颜色
If (e.Row.RowType = DataControlRowType.DataRow) Then
If (Convert.ToInt16(e.Row.Cells(2).Text) > 0) Then
e.Row.Cells(2).BackColor = System.Drawing.Color.LightBlue
End If
End If
End Sub
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
'显示客房客人的基本登记信息
Dim My房号 As String = Me.GridView1.SelectedRow.Cells(1).Text
Me.Label2.Text = My房号 + "房间当前入住客人的基本登记信息"
Dim MySQLConnectionString As String = ConfigurationManager.ConnectionStrings("MyHotelDBConnectionString").ConnectionString
Dim MySQL As String = "Select 入住编号,入住房号,客人姓名,住宿人数,联系电话,客人性别 From 客房入住单 Where 入住房号='" + My房号 + "' AND 入住编号 NOT IN (Select 入住编号 From 客房结账单)"
Me.SqlDataSource2.ConnectionString = MySQLConnectionString
Me.SqlDataSource2.SelectCommand = MySQL
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -