⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moduleclosefrom1.vb

📁 固定资产管理信息系统,虽然还有些不足,但基本功能已实现!希望大家多多改进!
💻 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 + -