📄 taskbookquery.aspx.vb
字号:
Imports System.Data.SqlClient
Public Class TaskBookQuery
Inherits clsTaskBook
Protected WithEvents dropdownlistaddress As System.Web.UI.HtmlControls.HtmlSelect
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
If Session("UserType") = "管理人员" Or Session("UserType") = "总工程师" Then
'显示地址
PubStrSql = "select * from AddressTable"
PubDataAdapter.SelectCommand.CommandText = PubStrSql
PubDataAdapter.Fill(PubDataSet, "tblAddress")
dropdownlistaddress.DataSource = PubDataSet.Tables("tblAddress")
dropdownlistaddress.DataTextField = "address"
dropdownlistaddress.DataValueField = "address"
dropdownlistaddress.DataBind()
For intLoopIndex = 0 To dropdownlistaddress.Items.Count - 1
If dropdownlistaddress.Items(intLoopIndex).Text.Trim = Session("UserAddress") Then
dropdownlistaddress.Items(intLoopIndex).Selected = True
Exit For
End If
Next
Else '只显示登录人员所在的地址
Dim strAddress As String
strAddress = Session("UserAddress")
dropdownlistaddress.Items.Add(strAddress)
End If
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -