📄 clsworkflowlogin.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "clsWorkflowLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private m_ErrorNumber As Long
Private m_ErrorDesc As String
Public Function Login(sConnectString As String, sUID As String, sPWD As String) As Boolean
Dim oConnect As Connect.ClsDataConnect
Dim oRS As ADODB.Recordset
Dim sSQL As String
Dim oError As Object
sSQL = "SELECT UserName, Password from User where UserName='" & sUID & "' AND Password='" & sPWD & "'"
If oConnect Is Nothing Then
Set oConnect = CreateObject("Connect.clsDataConnect")
End If
If oConnect.Connect(sConnectString) Then
If oConnect.ExecuteSQL(sSQL, 1) Then
Set oRS = oConnect.RecSet
If Not oRS Is Nothing Then
If Not oRS.EOF Then
Login = True
Else
Login = False
End If
End If
Else
Set oError = oConnect.Geterror
m_ErrorNumber = oError.Error_Number
m_ErrorDesc = oError.Error_Desc
End If
End If
Exit Function
Error_Handler:
Login = False
Set oRS = Nothing
Set oConnect = Nothing
End Function
Public Property Get ErrorNumber() As Long
ErrorNumber = m_ErrorNumber
End Property
Public Property Let ErrorNumber(lData As Long)
m_ErrorNumber = lData
End Property
Public Property Get ErrorDesc() As String
ErrorDesc = m_ErrorDesc
End Property
Public Property Let ErrorDesc(sData As String)
m_ErrorDesc = sData
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -