moduleclosefrom1.vb
来自「固定资产管理信息系统,虽然还有些不足,但基本功能已实现!希望大家多多改进!」· VB 代码 · 共 52 行
VB
52 行
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 + =
减小字号Ctrl + -
显示快捷键?