📄 frmtranselect.frm
字号:
VERSION 5.00
Begin VB.Form frmTranSelect
BorderStyle = 1 'Fixed Single
Caption = "事物选择"
ClientHeight = 4410
ClientLeft = 1845
ClientTop = 1185
ClientWidth = 3705
Icon = "frmTranSelect.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4410
ScaleWidth = 3705
Begin VB.ListBox lst
Height = 3840
Left = 0
MultiSelect = 2 'Extended
TabIndex = 2
Top = 30
Width = 3690
End
Begin VB.CommandButton cmdAck
Caption = "&A.确认"
Height = 300
Left = 1995
TabIndex = 1
Top = 4095
Width = 795
End
Begin VB.CommandButton cmdClose
Caption = "&C.关闭"
Height = 300
Left = 2895
TabIndex = 0
Top = 4095
Width = 795
End
End
Attribute VB_Name = "frmTranSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Event AckSelect(ByVal CondiSQL As String)
Public Event Cancel()
Private Function MakeCdt() As String
Dim TSQL As String
Dim i As Integer
Dim DtCode As String
TSQL = ""
For i = 0 To lst.ListCount - 1
If lst.Selected(i) Then
DtCode = Left(lst.List(i), InStr(lst.List(i), " ") - 1)
TSQL = TSQL & "'" & DtCode & "',"
End If
Next i
TSQL = IIf(TSQL = "", "", "f_DrugsTransact.DtCode IN (" & Left(TSQL, Len(TSQL) - 1)) & ")"
MakeCdt = TSQL
End Function
Public Sub FillData()
Dim i As Integer
lst.Clear
For i = 0 To gTsObj.Count - 1
If (gTsObj.PropType(i) = 1 Or gTsObj.PropType(i) = 2) Then
' And Not gTsObj.IsPatient(i) Then
lst.AddItem gTsObj.Code(i) & " " & gTsObj.Name(i)
End If
Next i
End Sub
Private Sub cmdAck_Click()
RaiseEvent AckSelect(MakeCdt())
Unload Me
End Sub
Private Sub cmdClose_Click()
RaiseEvent Cancel
Unload Me
End Sub
Private Sub Form_Load()
hisFormToCenter Me, frmMain
FillData
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmTranSelect = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -