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

📄 frmkeshi.frm

📁 本系统可用于医院和专业体检中心的健康体检管理
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   300
         Left            =   1170
         TabIndex        =   18
         Top             =   2655
         Width           =   3795
      End
      Begin VB.TextBox txtDXID 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1170
         TabIndex        =   17
         Top             =   345
         Width           =   3825
      End
      Begin VB.TextBox txtDXMC 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1170
         TabIndex        =   16
         Top             =   780
         Width           =   3825
      End
      Begin VB.TextBox txtDXPYSX 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1170
         TabIndex        =   15
         Top             =   1200
         Width           =   1305
      End
      Begin VB.TextBox txtDXWBSX 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   3540
         TabIndex        =   14
         Top             =   1200
         Width           =   1455
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "注意事项"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   2
         Left            =   240
         TabIndex        =   34
         Top             =   3135
         Width           =   855
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "显示顺序"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         TabIndex        =   33
         Top             =   1710
         Width           =   855
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "性别"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   32
         Top             =   2220
         Width           =   855
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "说明"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         TabIndex        =   31
         Top             =   3540
         Width           =   855
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "价格"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   30
         Top             =   2715
         Width           =   855
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "项目ID"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         TabIndex        =   29
         Top             =   420
         Width           =   855
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         TabIndex        =   28
         Top             =   855
         Width           =   855
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "拼音简码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         TabIndex        =   27
         Top             =   1275
         Width           =   855
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "五笔简码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   1
         Left            =   2580
         TabIndex        =   26
         Top             =   1260
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmKeShi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim menuOperation As OperationType
Dim m_strMenu As String

Public Sub ShowForm(ByVal strMenu As String)
    m_strMenu = strMenu
    Me.Show vbModal
End Sub

Private Sub cmbDXSXH_KeyPress(KeyAscii As Integer)
    EnterToTab KeyAscii
End Sub

Private Sub cmbKSSXH_KeyPress(KeyAscii As Integer)
    EnterToTab KeyAscii
End Sub

Private Sub cmdAdd_Click()
On Error GoTo ErrMsg
    Dim Status
    Dim strKey As String
    Dim strSQL As String
    Dim rsSXH As ADODB.Recordset
    Dim i As Integer
    
    Me.MousePointer = vbHourglass
    
    '权限验证
    If g_blnIsNew Then
        If Not g_clsAuthority.CheckOperationAuthority(m_strMenu, INSERT_W) Then GoTo ExitLab
    End If
    '验证完毕
    
    cmdAdd.Enabled = False
    cmdDelete.Enabled = False
    cmdModify.Enabled = False
    cmdSave.Enabled = True
    
    If tvwKSZH.SelectedItem Is Nothing Then GoTo ExitLab
    
    menuOperation = Add
    strKey = Mid(tvwKSZH.SelectedItem.Key, 2)
    Select Case Len(strKey)
        Case 0 '选择了根节点
            fraKS.Visible = True
            fraDX.Visible = False
            
            '添加科室
            txtKSID.Text = GetKSID()
            txtKSMC.Text = ""
            txtKSMC.Tag = ""
            txtKSPYSX.Text = ""
            txtKSWBSX.Text = ""
            txtKSSM.Text = ""
            txtDXZYSX.Text = ""
            
            '构造查询字符串
            strSQL = "select SXH from SET_SXH" _
                    & " where SXH not in (" _
                    & "select SXH from SET_KSSZ)"
            '打开记录集
            Set rsSXH = New ADODB.Recordset
            rsSXH.Open strSQL, GCon, adOpenStatic, adLockOptimistic
            '清空可能存在的显示
            cmbKSSXH.Clear
            For i = 1 To rsSXH.RecordCount
                cmbKSSXH.AddItem rsSXH("SXH")
                rsSXH.MoveNext
            Next
            
            If rsSXH.RecordCount > 0 Then
                cmbKSSXH.ListIndex = 0
                rsSXH.Close
            Else
                MsgBox "添加的同级项目数已经达到最大,请删除掉一部分项目后再添加!", vbInformation, "提示"
                cmdExit_Click
            End If
            
            EnableKSInput True
            txtKSMC.SetFocus
        Case 2, 4 '选择了科室,或者组合节点
            '添加组合
            fraKS.Visible = False
            fraDX.Visible = True
            
            txtDXID.Text = GetDXID(Left(strKey, 2))
            txtDXMC.Text = ""
            txtDXMC.Tag = ""
            txtDXPYSX.Text = ""
            txtDXPYSX.Tag = ""
            txtDXWBSX.Text = ""
            txtDXJG.Text = ""
            txtDXZYSX.Text = ""
            txtDXSM.Text = ""
            
            '构造查询字符串
            strSQL = "select SXH from SET_SXH" _
                    & " where SXH not in (" _
                    & "select SXH from SET_DX" _
                    & " where left(DXID,2)='" & Left(strKey, 2) & "')"
            '打开记录集
            Set rsSXH = New ADODB.Recordset
            rsSXH.Open strSQL, GCon, adOpenStatic, adLockOptimistic
            '清空可能存在的显示
            cmbDXSXH.Clear
            For i = 1 To rsSXH.RecordCount
                cmbDXSXH.AddItem rsSXH("SXH")
                rsSXH.MoveNext
            Next
            
            If rsSXH.RecordCount > 0 Then
                cmbDXSXH.ListIndex = 0
                rsSXH.Close
            Else
                MsgBox "添加的同级项目数已经达到最大,请删除掉一部分项目后再添加!", vbInformation, "提示"
                cmdExit_Click
            End If
            
            EnableDXInput True
            txtDXMC.SetFocus
    End Select
    Set rsSXH = Nothing
    
    GoTo ExitLab
ErrMsg:
    Status = SetError(Err.Number, Err.Description, Err.Source)
    ErrMsg Status
ExitLab:
    Me.MousePointer = vbDefault
End Sub

Private Sub cmdDelete_Click()
On Error GoTo ErrMsg
    Dim Status
    Dim strKey As String
    Dim strSQL As String
    Dim rsTemp As ADODB.Recordset
    Dim nodTemp As Node
    Dim lngCount As Long
    Dim i As Long
    Dim lngIndex As Long
    
    Me.MousePointer = vbHourglass
    
    '权限验证
    If g_blnIsNew Then
        If Not g_clsAuthority.CheckOperationAuthority(m_strMenu, DELETE_W) Then GoTo ExitLab
    End If
    '验证完毕
    
    If tvwKSZH.SelectedItem Is Nothing Then GoTo ExitLab
    
    strKey = Mid(tvwKSZH.SelectedItem.Key, 2)
    Select Case Len(strKey)
        Case 0 '选择了根节点
            GoTo ExitLab
        Case 2 '选择了科室
            If MsgBox("该操作不可恢复!" & vbCrLf & "确实要删除科室“" _
                    & tvwKSZH.SelectedItem.Text & "”吗?", _
                    vbExclamation + vbYesNo + vbDefaultButton2, _
                    "小心") = vbNo Then
                GoTo ExitLab
            End If
            
            '如果科室下尚有组合,则禁止删除
            strSQL = "select Count(*) from SET_DX" _
                    & " where left(DXID,2)='" & strKey & "'"
            Set rsTemp = New ADODB.Recordset
            rsTemp.Open strSQL, GCon, adOpenStatic, adLockReadOnly
            If rsTemp(0) >= 1 Then
                MsgBox "在科室“" & tvwKSZH.SelectedItem.Text & _
                        "”下面尚有组合存在,不能删除该科室!" & vbCrLf _
                        & "您可以先删除该科室下的所有组合,然后删除该科室!", _
                        vbExclamation, "警告"

⌨️ 快捷键说明

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