📄 frmstandardset.frm
字号:
TabIndex = 25
Top = 2700
Width = 720
End
Begin VB.Label Label26
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "最大值:"
Height = 195
Left = 2760
TabIndex = 24
Top = 2700
Width = 720
End
End
Begin VB.Frame fraSex
BackColor = &H80000018&
Caption = "适用性别"
Height = 615
Left = 120
TabIndex = 11
Top = 240
Width = 3105
Begin VB.OptionButton optNNTY
BackColor = &H80000018&
Caption = "所有"
Height = 255
Left = 300
TabIndex = 14
Top = 270
Value = -1 'True
Width = 825
End
Begin VB.OptionButton optMale
BackColor = &H80000018&
Caption = "男"
Height = 255
Left = 1245
TabIndex = 13
Top = 270
Width = 825
End
Begin VB.OptionButton optFemale
BackColor = &H80000018&
Caption = "女"
Height = 255
Left = 2190
TabIndex = 12
Top = 270
Width = 825
End
End
End
Begin VB.Frame Frame1
BackColor = &H80000018&
Caption = "体检标准"
Height = 2415
Left = 3900
TabIndex = 0
Top = 240
Width = 5415
Begin VB.Frame FrameCmd
BackColor = &H80000018&
Caption = "操作"
Height = 765
Left = 120
TabIndex = 3
Top = 1560
Width = 5175
Begin XPControls.XPCommandButton cmdSave
Height = 315
Left = 2775
TabIndex = 4
Top = 300
Width = 855
_ExtentX = 1508
_ExtentY = 556
Enabled = 0 'False
Caption = "保存"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdChange
Height = 315
Left = 1605
TabIndex = 5
Top = 300
Width = 855
_ExtentX = 1508
_ExtentY = 556
Caption = "修改"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdDel
Height = 315
Left = 3960
TabIndex = 6
Top = 300
Width = 855
_ExtentX = 1508
_ExtentY = 556
Caption = "删除"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdAdd
Height = 315
Left = 420
TabIndex = 7
Top = 300
Width = 855
_ExtentX = 1508
_ExtentY = 556
Caption = "添加"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Begin VB.ComboBox cmbBZMC
Height = 315
Left = 1530
TabIndex = 2
Top = 300
Width = 3765
End
Begin VB.TextBox txtBZSM
Height = 855
Left = 750
TabIndex = 1
Top = 690
Width = 4545
End
Begin VB.Label Label27
BackStyle = 0 'Transparent
Caption = "体检标准名称:"
Height = 300
Left = 120
TabIndex = 9
Top = 330
Width = 1365
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "说明:"
Height = 195
Left = 120
TabIndex = 8
Top = 690
Width = 540
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 4500
Top = 3270
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.TreeView tvwXMu
Height = 7215
Left = 180
TabIndex = 36
Top = 300
Width = 3555
_ExtentX = 6271
_ExtentY = 12726
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label1
BackColor = &H80000018&
BackStyle = 0 'Transparent
Caption = "所有项目:"
Height = 225
Left = 180
TabIndex = 37
Top = 60
Width = 1095
End
End
Attribute VB_Name = "frmStandardSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim m_enuOperation As OperationType
Dim mintBZID As Integer '修改时的标准ID
Dim mintIndex As Integer '修改时的索引号
Dim m_strMenu As String
Public Sub ShowForm(ByVal strMenu As String)
m_strMenu = strMenu
Me.Show vbModal
End Sub
Private Sub cmbAgeRange_Click()
On Error GoTo ErrMsg
Dim strSQL As String
Dim rsBZ As ADODB.Recordset
Dim strSHID As String
Me.MousePointer = vbArrowHourglass
Call EnableCommand(False)
Call EnableInput(False, False)
If tvwXMu.SelectedItem Is Nothing Then GoTo ExitLab
cmdAddInfo.Enabled = True
If cmbAgeRange.Text = "" Then
Call ClearInfo
GoTo ExitLab
End If
strSHID = LongToString(cmbAgeRange.ItemData(cmbAgeRange.ListIndex), 10)
'获取标准明细
strSQL = "select * from SET_TJBZDT" _
& " where SHID='" & strSHID & "'"
Set rsBZ = New ADODB.Recordset
rsBZ.Open strSQL, GCon, adOpenForwardOnly, adLockReadOnly
If rsBZ.EOF Then
Call ClearInfo
Else
txtNormalVal.Text = rsBZ("NormalVal") & ""
txtCKSX.Text = rsBZ("CKSX") & ""
txtCKXX.Text = rsBZ("CKXX") & ""
txtDW.Text = rsBZ("DW") & ""
txtDAge.Text = rsBZ("LowerAge")
txtUAge.Text = rsBZ("UpperAge")
txtLowInfo.Text = rsBZ("LowInfo") & ""
txtHighInfo.Text = rsBZ("HighInfo") & ""
txtMinVal.Text = rsBZ("MinVal") & ""
txtMaxVal.Text = rsBZ("MaxVal") & ""
'显示性别
Select Case rsBZ("Sex")
Case 0
optNNTY.Value = True
Case 1
optMale.Value = True
Case 2
optFemale.Value = True
End Select
cmdModifyInfo.Enabled = True
cmdDeleteInfo.Enabled = True
rsBZ.Close
End If
GoTo ExitLab
ErrMsg:
MsgBoxW Err
ExitLab:
Me.MousePointer = vbDefault
End Sub
Private Sub cmbBZMC_Click()
On Error GoTo ErrMsg
Dim Status
Dim strSQL As String
Dim rsBZ As ADODB.Recordset
Me.MousePointer = vbHourglass
cmdSave.Enabled = False
If cmbBZMC.ListCount < 0 Then
cmdAdd.Enabled = True
cmdChange.Enabled = False
cmdDel.Enabled = False
GoTo ExitLab
Else
If cmbBZMC.ListCount = 1 Then
'只有一条标准时禁用删除
cmdDel.Enabled = False
Else
'超过一条时可以删除
cmdDel.Enabled = True
End If
cmdAdd.Enabled = False '存在标准时禁用添加
cmdChange.Enabled = True
End If
If cmbBZMC.ListIndex < 0 Then
txtBZSM.Text = ""
fraInfo.Enabled = False
GoTo ExitLab
End If
'获取当前选中标准的说明
strSQL = "select BZSM from SET_TJBZIndex" _
& " where BZID=" & Val(cmbBZMC.ItemData(cmbBZMC.ListIndex))
Set rsBZ = New ADODB.Recordset
rsBZ.Open strSQL, GCon, adOpenKeyset, adLockOptimistic
If rsBZ.RecordCount > 0 Then
txtBZSM.Text = rsBZ("BZSM")
rsBZ.Close
End If
Call tvwXMu_NodeClick(tvwXMu.SelectedItem)
GoTo ExitLab
ErrMsg:
Status = SetError(Err.Number, Err.Description, Err.Source)
ErrMsg Status
ExitLab:
Me.MousePointer = vbDefault
End Sub
Private Sub cmdAdd_Click()
'权限验证
If g_blnIsNew Then
If Not g_clsAuthority.CheckOperationAuthority(m_strMenu, INSERT_W) Then GoTo ExitLab
End If
'验证完毕
cmbBZMC.Text = ""
txtBZSM.Text = ""
mintBZID = -1
cmdChange.Enabled = False
cmdAdd.Enabled = False
cmdSave.Enabled = True
If Not (tvwXMu.SelectedItem Is Nothing) Then Call tvwXMu_NodeClick(tvwXMu.SelectedItem)
ExitLab:
End Sub
Private Sub cmdAddInfo_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -