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

📄 frmlogin.frm

📁 1、以DLL形式提供医生工作站 2、 根据【检查项目】
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{806F1F89-D431-4F37-A387-2868CC03DCA8}#48.0#0"; "GetData.ocx"
Begin VB.Form frmLogin 
   BackColor       =   &H00F1E7DA&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "HTPACS-CT工作站"
   ClientHeight    =   3825
   ClientLeft      =   2835
   ClientTop       =   3570
   ClientWidth     =   6090
   Icon            =   "frmLogin.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmLogin.frx":6852
   ScaleHeight     =   2259.936
   ScaleMode       =   0  'User
   ScaleWidth      =   5718.181
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox cmbUserId 
      Height          =   300
      Left            =   120
      TabIndex        =   9
      Text            =   "Combo2"
      Top             =   3360
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00F1E7DA&
      Height          =   1575
      Left            =   0
      TabIndex        =   0
      Top             =   1680
      Width           =   6015
      Begin VB.TextBox txtPassword 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         IMEMode         =   3  'DISABLE
         Left            =   1365
         MaxLength       =   50
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1125
         Width           =   4125
      End
      Begin VB.ComboBox cmbDepartments 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "frmLogin.frx":22038
         Left            =   1395
         List            =   "frmLogin.frx":2203A
         Style           =   2  'Dropdown List
         TabIndex        =   6
         Top             =   240
         Width           =   4125
      End
      Begin VB.ComboBox cmbUsers 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "frmLogin.frx":2203C
         Left            =   1380
         List            =   "frmLogin.frx":2203E
         Style           =   2  'Dropdown List
         TabIndex        =   8
         Top             =   675
         Width           =   4125
      End
      Begin VB.Label lblLabels 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "部  门"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   270
         Index           =   2
         Left            =   570
         TabIndex        =   7
         Top             =   270
         Width           =   765
      End
      Begin VB.Label lblLabels 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "密  码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   270
         Index           =   1
         Left            =   555
         TabIndex        =   3
         Top             =   1162
         Width           =   765
      End
      Begin VB.Label lblLabels 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "用  户"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   0
         Left            =   555
         TabIndex        =   2
         Top             =   705
         Width           =   765
      End
   End
   Begin GetData.XPB btnOk 
      Height          =   375
      Left            =   3240
      TabIndex        =   4
      Top             =   3360
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      Caption         =   "确定"
      FontColor       =   -2147483630
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin GetData.XPB btnCancel 
      Height          =   375
      Left            =   4560
      TabIndex        =   5
      Top             =   3360
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      Caption         =   "取消"
      FontColor       =   -2147483630
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Image Image1 
      Height          =   1695
      Left            =   0
      Picture         =   "frmLogin.frx":22040
      Top             =   0
      Width           =   6060
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'------------------------------------------------------------------------------------
'文件:frmLogin.frm
'作者:冷家锋
'时间:2008-1-10
'说明:用户登录窗体
'------------------------------------------------------------------------------------

Option Explicit

Dim iCurDepartIndex As Integer
Dim rsDepartment As New ADODB.Recordset
Dim myConn As New ADODB.Connection
'建立部门名--部门ID的映射
Dim ArrayDepartmentIndex()

Dim bColorSet As Boolean

'取消按钮事件
Private Sub btnCancel_Click(Shifit As Integer)
On Error GoTo ErrHandler
    Unload Me
    Exit Sub
ErrHandler:
    
End Sub


'确定按钮事件
Private Sub btnOk_Click(Shifit As Integer)
On Error GoTo ErrHandler
    If Len((cmbDepartments.Text)) <= 0 Then
        MsgBox "请选择正确的部门!", vbExclamation, "用户登录"
        Exit Sub
    End If
    
    If Len((cmbUsers.Text)) <= 0 Then
        MsgBox "请选择正确的用户!", vbExclamation, "用户登录"
        Exit Sub
    End If
    
    
    If Len((txtPassword.Text)) <= 0 Then
        MsgBox "密码错误, 请重新输入!", vbExclamation, "用户登录"
        txtPassword.SetFocus
        Exit Sub
    End If
    
    
    If stringCheck(Trim(txtPassword.Text)) = False Then
        Exit Sub
    End If
    
    
    Dim rsUser As New ADODB.Recordset
    Dim sqlExecute As String
    sqlExecute = "SELECT ID, Name,DOCTOR_NAME,UserPassword, UserPower,DepartmentId FROM Doctor WHERE id = '" _
        & Trim(cmbUserId.Text) & "'"
        
    If myConn.State <> adStateClosed Then
        myConn.Close
    End If
    myConn.Open modGlobalDbConnect.GetConnectionString
    
    If myConn.State = adStateClosed Then
        MsgBox "数据库连接错误,请查看网络状态!", vbExclamation, "提示"
        Exit Sub
    End If
    
    rsUser.Open sqlExecute, myConn
        
    If rsUser.RecordCount <= 0 Then
        MsgBox "该用户名不存在, 请重新选择", vbExclamation, "用户登录"
        rsUser.Close
        txtPassword.Text = ""
        myConn.Close
        Set myConn = Nothing
        Exit Sub
    End If

    If rsUser.Fields("UserPassword") = txtPassword.Text Then
    'Encrypt.UserCode(txtPassword.Text) Then
        Dim rsGroup As New ADODB.Recordset
        sqlExecute = "SELECT POWER FROM Department WHERE ID = '" + _
            Trim(rsUser.Fields("DepartmentId")) + "'"

⌨️ 快捷键说明

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