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

📄 mdllogin.bas

📁 一个简单的快餐店收银软件
💻 BAS
字号:
Attribute VB_Name = "mdlLogin"
'**********************************************
'*    模 块 名 称 :登陆窗口模块
'*    功 能 描 述 :
'*    程序员姓名  : 罗胸怀
'*    最后修改人  : 罗胸怀
'*    最后修改时间:2005-02-09
'*    备        注:
'**********************************************
'检查用户编号是否存在
Public Function CheckUserID(strUID As String) As Boolean
Dim adoUser_Info As New ADODB.Recordset
strSql = "select * from User_Info where User_ID = '" & strUID & "'"

8 Set adoUser_Info = Conn.Execute(strSql)
With adoUser_Info
    If .EOF And .BOF Then
        CheckUserID = False
    Else
        CheckUserID = True
    End If
    .Close
End With
Set adoUser_Info = Nothing
End Function
'读取用户名称
Public Function GetUserName(strUID As String) As String
Dim adoUser_Info As New ADODB.Recordset
strSql = "select * from User_Info where User_ID = '" & strUID & "'"

Set adoUser_Info = Conn.Execute(strSql)
With adoUser_Info
    If .EOF And .BOF Then
        GetUserName = ""
    Else
        GetUserName = adoUser_Info.Fields("User_Name")
    End If
    .Close
End With
Set adoUser_Info = Nothing
End Function
'检查用户密码是否正确
Public Function CheckUserPwd(strUID As String, strPwd As String) As Boolean
Dim adoUser_Info As New ADODB.Recordset
strSql = "select * from User_Info where User_ID = '" & strUID & "' and User_Pwd = '" & strPwd & "'"

Set adoUser_Info = Conn.Execute(strSql)
With adoUser_Info
    If .EOF And .BOF Then
        CheckUserPwd = False
    Else
        CheckUserPwd = True
    End If
    .Close
End With
Set adoUser_Info = Nothing
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -