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

📄 dlgzys.frm

📁 本系统可用于医院和专业体检中心的健康体检管理
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{0B81E4A9-BE4E-4AEF-9272-33AB5B51C6FC}#1.0#0"; "XPControls.ocx"
Begin VB.Form dlgZYS 
   BackColor       =   &H80000018&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "职业史"
   ClientHeight    =   3600
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5985
   Icon            =   "dlgZYS.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3600
   ScaleWidth      =   5985
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox CmbFHCS 
      Height          =   315
      Left            =   1320
      TabIndex        =   15
      Top             =   2370
      Width           =   4335
   End
   Begin VB.ComboBox CmbYHYS 
      Height          =   315
      Left            =   1320
      TabIndex        =   14
      Top             =   1980
      Width           =   4335
   End
   Begin VB.ComboBox CmbGongZhong 
      Height          =   315
      Left            =   1320
      TabIndex        =   13
      Top             =   1560
      Width           =   4335
   End
   Begin VB.ComboBox CmbCheJian 
      Height          =   315
      Left            =   1320
      TabIndex        =   12
      Text            =   "CmbCheJian"
      Top             =   1140
      Width           =   4335
   End
   Begin XPControls.XPCommandButton CmdOK 
      Height          =   405
      Left            =   1530
      TabIndex        =   10
      Top             =   3000
      Width           =   825
      _ExtentX        =   1455
      _ExtentY        =   714
      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 VB.ComboBox CmbDW 
      Height          =   315
      Left            =   1320
      TabIndex        =   9
      Top             =   720
      Width           =   4335
   End
   Begin MSComCtl2.DTPicker dtpEnd 
      Height          =   345
      Left            =   4290
      TabIndex        =   0
      Top             =   270
      Width           =   1365
      _ExtentX        =   2408
      _ExtentY        =   609
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Format          =   23789569
      CurrentDate     =   38037
      MaxDate         =   73415
      MinDate         =   2
   End
   Begin MSComCtl2.DTPicker dtpBegin 
      Height          =   345
      Left            =   1320
      TabIndex        =   1
      Top             =   270
      Width           =   1365
      _ExtentX        =   2408
      _ExtentY        =   609
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Format          =   23789569
      CurrentDate     =   38037
      MaxDate         =   73415
      MinDate         =   2
   End
   Begin XPControls.XPCommandButton CmdCancel 
      Height          =   405
      Left            =   3630
      TabIndex        =   11
      Top             =   3000
      Width           =   825
      _ExtentX        =   1455
      _ExtentY        =   714
      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 VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "防护措施:"
      Height          =   225
      Left            =   180
      TabIndex        =   8
      Top             =   2430
      Width           =   1035
   End
   Begin VB.Label Label10 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "工种:"
      Height          =   225
      Left            =   180
      TabIndex        =   7
      Top             =   1635
      Width           =   1035
   End
   Begin VB.Label Label8 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "车间:"
      Height          =   225
      Left            =   180
      TabIndex        =   6
      Top             =   1215
      Width           =   1035
   End
   Begin VB.Label Label6 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "工作单位:"
      Height          =   225
      Left            =   180
      TabIndex        =   5
      Top             =   765
      Width           =   1035
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "有害因素:"
      Height          =   225
      Left            =   180
      TabIndex        =   4
      Top             =   2025
      Width           =   1035
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "开始时间:"
      Height          =   225
      Left            =   180
      TabIndex        =   3
      Top             =   360
      Width           =   1035
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "结束时间:"
      Height          =   225
      Left            =   3150
      TabIndex        =   2
      Top             =   360
      Width           =   1035
   End
End
Attribute VB_Name = "dlgZYS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim mblnOK As Boolean '用户单击了哪个按钮
Dim mstrRet As String
Dim menuOperation As OperationType


Private Sub cmdCancel_Click()
    mblnOK = False
    Unload Me
End Sub

Private Sub cmdOK_Click()
    Dim itmZYS As ListItem
    
    '校验用户输入的合法性
    '开始时间
    If dtpBegin.Value > Date Then
        MsgBox "您输入的开始时间不符合实际情况,请重新输入!", vbInformation, "提示"
        dtpBegin.SetFocus
        Exit Sub
    End If
    
    '戒断时间
    If dtpEnd.Value > Date Then
        MsgBox "您输入的结束时间不符合实际情况,请重新输入!", vbInformation, "提示"
        dtpEnd.SetFocus
        Exit Sub
    End If
    
    '开始时间是否在戒断时间前面
    If dtpBegin.Value > dtpEnd.Value Then
        MsgBox "开始时间不应该比结束时间迟!请重新输入!", vbInformation, "提示"
        dtpBegin.SetFocus
        Exit Sub
    End If
     
    '校验完毕
    mblnOK = True
    
    mstrRet = dtpBegin.Value & JoinSymbol _
            & dtpEnd.Value & JoinSymbol _
            & CmbDW.Text & JoinSymbol _
            & CmbCheJian.Text & JoinSymbol _
            & CmbGongZhong.Text & JoinSymbol _
            & CmbYHYS.Text & JoinSymbol _
            & CmbFHCS.Text
    
    Unload Me

End Sub

Private Sub Form_Load()
    dtpEnd.Value = Date
    ShowDW Me, CmbDW
    ShowZD Me, CmbCheJian, "CheJian"
    ShowZD Me, CmbGongZhong, "GongZhong"
    ShowZD Me, CmbYHYS, "YHYS"
    ShowZD Me, CmbFHCS, "FHCS"
End Sub

'被FrmQuery_C调用的函数
Public Function ShowZYS(ByVal enuOperation As OperationType, Optional ByVal strZYS As String) As String
On Error GoTo ErrMsg
    Dim Status
    Dim arrZYS
    Dim i
    Dim blHave As Boolean     '标识各项列表框的列表中是否有传入的单位名称
    
    blHave = False
    
    menuOperation = enuOperation
    
    '判断是否更新
    If enuOperation = Modify Then
        arrZYS = Split(strZYS, JoinSymbol)
        
        dtpBegin.Value = arrZYS(0)
        dtpEnd.Value = arrZYS(1)
        
        '填入单位名称
        For i = 0 To CmbDW.ListCount
            If arrZYS(2) = CmbDW.List(i) Then
                CmbDW.ListIndex = i
                blHave = True
                Exit For
            End If
        Next i
        If blHave = False Then
            CmbDW.Text = arrZYS(2)
        End If
        
        blHave = False
        '填入车间名称
        For i = 0 To CmbCheJian.ListCount
            If arrZYS(3) = CmbCheJian.List(i) Then
                CmbCheJian.ListIndex = i
                blHave = True
                Exit For
            End If
        Next i
        If blHave = False Then
            CmbCheJian.Text = arrZYS(3)
        End If
        
        blHave = False
        '填入工种名称
        For i = 0 To CmbGongZhong.ListCount
            If arrZYS(4) = CmbGongZhong.List(i) Then
                CmbGongZhong.ListIndex = i
                blHave = True
                Exit For
            End If
        Next i
        If blHave = False Then
            CmbGongZhong.Text = arrZYS(4)
        End If
       
        blHave = False
        '填入有害因素名称
        For i = 0 To CmbYHYS.ListCount
            If arrZYS(5) = CmbYHYS.List(i) Then
                CmbYHYS.ListIndex = i
                blHave = True
                Exit For
            End If
        Next i
        If blHave = False Then
            CmbYHYS.Text = arrZYS(5)
        End If
        
        blHave = False
        '填入防护措施名称
        For i = 0 To CmbFHCS.ListCount
            If arrZYS(6) = CmbFHCS.List(i) Then
                CmbFHCS.ListIndex = i
                blHave = True
                Exit For
            End If
        Next i
        If blHave = False Then
            CmbFHCS.Text = arrZYS(6)
        End If
    End If
    
    '显示窗体
    Me.Show vbModal
    
    '查看返回值
    If mblnOK = True Then
        ShowZYS = mstrRet
    End If
    
    Exit Function
ErrMsg:
    
End Function


⌨️ 快捷键说明

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