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

📄 frmgetdrugselect.frm

📁 医院门诊医生工作站,vb6 SqlServer
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmGetDrugSelect 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "条件选择"
   ClientHeight    =   3555
   ClientLeft      =   3015
   ClientTop       =   1845
   ClientWidth     =   6390
   Icon            =   "frmGetDrugSelect.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3555
   ScaleWidth      =   6390
   Begin VB.Frame fra 
      Caption         =   "医嘱类型"
      Height          =   1845
      Left            =   4020
      TabIndex        =   2
      Top             =   195
      Width           =   2355
      Begin VB.OptionButton OptADVType 
         Caption         =   "长期"
         Height          =   315
         Index           =   2
         Left            =   615
         TabIndex        =   6
         Top             =   1380
         Width           =   1515
      End
      Begin VB.OptionButton OptADVType 
         Caption         =   "临时"
         Height          =   315
         Index           =   1
         Left            =   630
         TabIndex        =   5
         Top             =   907
         Width           =   1515
      End
      Begin VB.OptionButton OptADVType 
         Caption         =   "所有"
         Height          =   315
         Index           =   0
         Left            =   615
         TabIndex        =   4
         Top             =   435
         Width           =   1515
      End
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "&C.关闭"
      Height          =   300
      Left            =   5535
      TabIndex        =   1
      Top             =   3210
      Width           =   795
   End
   Begin VB.CommandButton cmdAck 
      Caption         =   "&K.确认"
      Height          =   300
      Left            =   4695
      TabIndex        =   0
      Top             =   3210
      Width           =   795
   End
   Begin MSComctlLib.ImageList img 
      Left            =   4230
      Top             =   2160
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmGetDrugSelect.frx":0442
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmGetDrugSelect.frx":0896
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmGetDrugSelect.frx":0CEA
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView tvw 
      Height          =   3255
      Left            =   0
      TabIndex        =   7
      Top             =   300
      Width           =   4005
      _ExtentX        =   7064
      _ExtentY        =   5741
      _Version        =   393217
      HideSelection   =   0   'False
      LabelEdit       =   1
      Style           =   7
      ImageList       =   "img"
      Appearance      =   1
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "药品类型"
      Height          =   180
      Left            =   30
      TabIndex        =   3
      Top             =   90
      Width           =   720
   End
End
Attribute VB_Name = "frmGetDrugSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Event AckSelect(ByVal ItemType As String, ByVal ADvType As Integer)
Public Event Cancel()

Public Sub FillData()
    Dim SQL As String
    Dim PNode As Node
    
    hisFormClear Me
    
    tvw.Nodes.Clear
    Screen.MousePointer = 11
    frmMain.Note = "正在装入...请等候"
    tvw.Nodes.Clear
    Set PNode = tvw.Nodes.Add(, , "Root", "全院")
    PNode.Expanded = True
    SQL = "SELECT ItemCode,ItemName FROM m_ItemCati WHERE Flag & 1 = 1 " _
        & " AND " & gfnMakeLimit(gtydSysConfig.ItemCode, "m_ItemCati.ItemCode", False)
    If gDbObj.GetRs(SQL) > 0 Then
        Do Until gDbObj.Rs.EOF
            Set PNode = gfnFindParent(PNode, gDbObj.Rs!ItemCode)
            Set PNode = tvw.Nodes.Add(PNode, tvwChild, "S" & gDbObj.Rs!ItemCode, gDbObj.Rs!ItemCode & " " & gDbObj.Rs!ItemName)
            PNode.Parent.Image = 2
            PNode.Image = 3
            gDbObj.Rs.MoveNext
        Loop
    End If
    tvw.Nodes.Item(1).Image = 1
    tvw.Nodes.Item(1).Selected = True
    frmMain.Note = ""
    Screen.MousePointer = 0
End Sub

Private Sub cmdAck_Click()
    Dim TmpStr As String, ADvType As Integer
    
    If Not (tvw.SelectedItem Is Nothing) Then
        If Me.tvw.SelectedItem.Index > 1 Then
            TmpStr = Left(tvw.SelectedItem.Text, InStr(tvw.SelectedItem.Text, " ") - 1)
        End If
    End If
    If OptADVType(0).Value Then
        ADvType = 0
    End If
    If OptADVType(1).Value Then
        ADvType = 1
    End If
    If OptADVType(2).Value Then
        ADvType = 2
    End If
    RaiseEvent AckSelect(TmpStr, ADvType)
    Unload Me
End Sub


Private Sub cmdClose_Click()
    RaiseEvent Cancel
    Unload Me
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then
        hisToActiveCtl(Me).SetFocus
        KeyAscii = 0
    End If
End Sub

Private Sub Form_Load()
    hisFormToCenter Me, frmMain
    hisFormClear Me
    OptADVType(0).Value = True
    FillData
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmGetDrugSelect = Nothing
End Sub

⌨️ 快捷键说明

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