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

📄 main_kqgl_sjsz.frm

📁 人事管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form main_kqgl_sjsz 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "考勤时间设置"
   ClientHeight    =   3330
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5430
   Icon            =   "main_kqgl_sjsz.frx":0000
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3330
   ScaleWidth      =   5430
   Begin VB.Frame Frame1 
      Height          =   60
      Left            =   -630
      TabIndex        =   7
      Top             =   2640
      Width           =   6120
   End
   Begin VB.CommandButton Command3 
      Caption         =   "确定"
      Height          =   360
      Left            =   2865
      TabIndex        =   6
      Top             =   2850
      Width           =   1095
   End
   Begin VB.CommandButton Command4 
      Caption         =   "取消"
      Height          =   360
      Left            =   4200
      TabIndex        =   5
      Top             =   2835
      Width           =   1095
   End
   Begin MSMask.MaskEdBox MaskEdBox2 
      Height          =   330
      Left            =   1965
      TabIndex        =   3
      Top             =   1935
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   582
      _Version        =   393216
      MaxLength       =   5
      Format          =   "hh:mm"
      Mask            =   "##:##"
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox MaskEdBox1 
      Height          =   330
      Left            =   1995
      TabIndex        =   8
      Top             =   1395
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   582
      _Version        =   393216
      MaxLength       =   5
      Format          =   "hh:mm"
      Mask            =   "##:##"
      PromptChar      =   "_"
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "下班时间:"
      Height          =   255
      Left            =   1035
      TabIndex        =   4
      Top             =   1995
      Width           =   1245
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "上班时间:"
      Height          =   255
      Left            =   1035
      TabIndex        =   2
      Top             =   1485
      Width           =   1245
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "设置本单位正常的上下班时间"
      Height          =   300
      Left            =   1470
      TabIndex        =   1
      Top             =   915
      Width           =   2505
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "上下班时间"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   1950
      TabIndex        =   0
      Top             =   270
      Width           =   1620
   End
End
Attribute VB_Name = "main_kqgl_sjsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub Command3_Click()
  If Left(MaskEdBox1.Text, 2) > 24 Or Left(MaskEdBox2.Text, 2) > 24 Then
    MsgBox "时间输入错误!"
    Exit Sub
  End If
  If Right(MaskEdBox1.Text, 2) > 59 Or Right(MaskEdBox2.Text, 2) > 59 Then
    MsgBox "时间输入错误!"
    Exit Sub
  End If
  If InStr(1, MaskEdBox1.Text, "_") <> 0 Or InStr(1, MaskEdBox2.Text, "_") <> 0 Then
    MsgBox "时间输入错误!"
    Exit Sub
  End If
  rs.Open "select * from 时间设置表", Cnn, adOpenKeyset, adLockOptimistic
  If rs.RecordCount > 0 Then
     rs.Fields("上班时间") = MaskEdBox1.Text
     rs.Fields("下班时间") = MaskEdBox2.Text
     rs.Update
   Else
     rs.AddNew
     rs.Fields("上班时间") = MaskEdBox1.Text
     rs.Fields("下班时间") = MaskEdBox2.Text
     rs.Update
   End If
   rs.Close
End Sub

Private Sub Command4_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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