ChangeEvent2.frm
上传用户:cntx88
上传日期:2022-08-07
资源大小:169k
文件大小:4k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Begin VB.Form ChangeEvent2 
  4.    Caption         =   "修改考勤记录"
  5.    ClientHeight    =   5430
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   3765
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5430
  11.    ScaleWidth      =   3765
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "修改考勤记录"
  15.       Height          =   5175
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   3495
  20.       Begin VB.CommandButton Command2 
  21.          Cancel          =   -1  'True
  22.          Caption         =   "放弃修改"
  23.          Height          =   495
  24.          Left            =   240
  25.          TabIndex        =   9
  26.          Top             =   4440
  27.          Width           =   3015
  28.       End
  29.       Begin VB.CommandButton Command1 
  30.          Caption         =   "提交修改"
  31.          Default         =   -1  'True
  32.          Height          =   495
  33.          Left            =   240
  34.          TabIndex        =   8
  35.          Top             =   3720
  36.          Width           =   3015
  37.       End
  38.       Begin VB.ComboBox TypeCombo 
  39.          Height          =   300
  40.          Left            =   240
  41.          TabIndex        =   7
  42.          Top             =   3000
  43.          Width           =   3015
  44.       End
  45.       Begin MSComCtl2.DTPicker DTPicker1 
  46.          Height          =   375
  47.          Left            =   240
  48.          TabIndex        =   5
  49.          Top             =   2160
  50.          Width           =   3015
  51.          _ExtentX        =   5318
  52.          _ExtentY        =   661
  53.          _Version        =   393216
  54.          Enabled         =   0   'False
  55.          Format          =   662831105
  56.          CurrentDate     =   38011
  57.       End
  58.       Begin VB.TextBox EvtTime 
  59.          Appearance      =   0  'Flat
  60.          Height          =   270
  61.          Left            =   240
  62.          TabIndex        =   4
  63.          Top             =   1320
  64.          Width           =   3015
  65.       End
  66.       Begin VB.TextBox User 
  67.          Appearance      =   0  'Flat
  68.          Enabled         =   0   'False
  69.          Height          =   270
  70.          Left            =   240
  71.          TabIndex        =   1
  72.          Top             =   600
  73.          Width           =   3015
  74.       End
  75.       Begin VB.Label Label4 
  76.          Caption         =   "考勤类别"
  77.          Height          =   255
  78.          Left            =   240
  79.          TabIndex        =   10
  80.          Top             =   2760
  81.          Width           =   1455
  82.       End
  83.       Begin VB.Label Label3 
  84.          Caption         =   "考勤记录时间"
  85.          Height          =   255
  86.          Left            =   240
  87.          TabIndex        =   6
  88.          Top             =   1920
  89.          Width           =   1575
  90.       End
  91.       Begin VB.Label Label2 
  92.          Caption         =   "考勤时间(【分仲】【天】)"
  93.          Height          =   255
  94.          Left            =   240
  95.          TabIndex        =   3
  96.          Top             =   1080
  97.          Width           =   2655
  98.       End
  99.       Begin VB.Label Label1 
  100.          Caption         =   "员工ID号"
  101.          Height          =   255
  102.          Left            =   240
  103.          TabIndex        =   2
  104.          Top             =   360
  105.          Width           =   1455
  106.       End
  107.    End
  108. End
  109. Attribute VB_Name = "ChangeEvent2"
  110. Attribute VB_GlobalNameSpace = False
  111. Attribute VB_Creatable = False
  112. Attribute VB_PredeclaredId = True
  113. Attribute VB_Exposed = False
  114. Option Explicit
  115. Public Cancel As Boolean        '窗体是否取消退出的判断变量
  116. Private Sub Command1_Click()
  117.     If TypeCombo.ListIndex = -1 Then        '检查输入有效性
  118.         MsgBox "考勤类别不能为空!", vbCritical
  119.         TypeCombo.SetFocus
  120.         Exit Sub
  121.     End If
  122.     If EvtTime.Text = "" Then
  123.         MsgBox "考勤时间长度不能为空!", vbCritical
  124.         EvtTime.SetFocus
  125.         Exit Sub
  126.     End If
  127.     If Not IsNumeric(EvtTime.Text) Then
  128.         MsgBox "考勤时间必须是数字!", vbCritical
  129.         EvtTime.SetFocus
  130.         Exit Sub
  131.     End If
  132.     Me.Hide     '输入数据无误则返回
  133. End Sub
  134. Private Sub Command2_Click()
  135.     Cancel = False      '设置窗体时取消退出的状态
  136.     Me.Hide             '返回
  137. End Sub
  138. Private Sub Form_Load()
  139.     Me.Left = (Screen.Width - Me.ScaleWidth) / 2        '窗体居中显示
  140.     Me.Top = (Screen.Height - Me.ScaleHeight) / 2
  141. End Sub