📄 moduleclosefrom1.vb
字号:
Imports System.Data
Imports System.Data.sqlClient
Module ModuleCloseFrom1
Dim ObjCloseFrom1 As New Form1
Dim ObjLogin As New Login
Dim DataSet As DataSet = New DataSet
Dim CustDataAdapter As New SqlDataAdapter
Dim conn As New SqlConnection
'Dim StrData As String
Dim assentTable As DataTable
Dim result As DataRow
Dim strSql As String
Public type As Integer
Public Function closeFrom1()
conn = New SqlConnection(StrData)
strSql = "Select UTYPE From T_USER Where UNAME = '" + ObjLogin.userName + "' and UPWD = '" + ObjLogin.paw + "'"
Dim myCommand As SqlCommand = New SqlCommand(strSql, conn)
' MsgBox(ObjLogin.userName)
'MsgBox(ObjLogin.paw)
CustDataAdapter.SelectCommand = myCommand
CustDataAdapter.Fill(DataSet, "T_USER")
For Each result In DataSet.Tables("T_USER").Rows
ObjLogin.ComboBox3.Items.Clear()
ObjLogin.ComboBox3.Items.Add(result("UTYPE"))
Next
ObjLogin.ComboBox3.Text = ObjLogin.ComboBox3.Items(0)
type = CInt(ObjLogin.ComboBox3.Text)
' MsgBox(type)
conn.Open()
'ObjLogin.type_1 = type
Return type
End Function
End Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -