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

📄 dutyinfo.frm

📁 人力资源管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDutyInfo 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "员工考勤信息:"
   ClientHeight    =   2745
   ClientLeft      =   3900
   ClientTop       =   5100
   ClientWidth     =   7395
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2745
   ScaleWidth      =   7395
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定(&O)"
      Height          =   375
      Left            =   4800
      TabIndex        =   2
      Top             =   2280
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消(&C)"
      Height          =   375
      Left            =   6120
      TabIndex        =   1
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   7215
      Begin VB.TextBox txtMonth 
         Enabled         =   0   'False
         Height          =   270
         Left            =   5160
         TabIndex        =   18
         Top             =   1800
         Width           =   1575
      End
      Begin VB.TextBox txtLessWork 
         Height          =   270
         Left            =   5160
         TabIndex        =   17
         Top             =   1320
         Width           =   1215
      End
      Begin VB.TextBox txtLeave 
         Height          =   270
         Left            =   5160
         TabIndex        =   16
         Top             =   840
         Width           =   1215
      End
      Begin VB.TextBox txtName 
         Enabled         =   0   'False
         Height          =   270
         Left            =   5160
         TabIndex        =   15
         Top             =   360
         Width           =   1575
      End
      Begin VB.TextBox txtOverWork 
         Height          =   270
         Left            =   1800
         TabIndex        =   14
         Top             =   1800
         Width           =   1335
      End
      Begin VB.TextBox txtLate 
         Height          =   270
         Left            =   1800
         TabIndex        =   13
         Top             =   1320
         Width           =   1335
      End
      Begin VB.TextBox txtDuty 
         Height          =   270
         Left            =   1800
         TabIndex        =   12
         Top             =   840
         Width           =   1335
      End
      Begin VB.TextBox txtNum 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1800
         TabIndex        =   11
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label13 
         Caption         =   "天"
         Height          =   255
         Left            =   3240
         TabIndex        =   23
         Top             =   840
         Width           =   375
      End
      Begin VB.Label Label12 
         Caption         =   "天"
         Height          =   255
         Left            =   6480
         TabIndex        =   22
         Top             =   1320
         Width           =   375
      End
      Begin VB.Label Label11 
         Caption         =   "天"
         Height          =   255
         Left            =   6480
         TabIndex        =   21
         Top             =   840
         Width           =   375
      End
      Begin VB.Label Label10 
         Caption         =   "次"
         Height          =   255
         Left            =   3240
         TabIndex        =   20
         Top             =   1320
         Width           =   375
      End
      Begin VB.Label Label9 
         Caption         =   "次"
         Height          =   255
         Left            =   3240
         TabIndex        =   19
         Top             =   1800
         Width           =   375
      End
      Begin VB.Label Label8 
         Caption         =   "所属工资月份:"
         Height          =   255
         Left            =   3720
         TabIndex        =   10
         Top             =   1800
         Width           =   1455
      End
      Begin VB.Label Label7 
         Caption         =   "旷工天数:"
         Height          =   255
         Left            =   4080
         TabIndex        =   9
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label6 
         Caption         =   "请假天数:"
         Height          =   255
         Left            =   4080
         TabIndex        =   8
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "员工姓名:"
         Height          =   255
         Left            =   4080
         TabIndex        =   7
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "加班次数:"
         Height          =   255
         Left            =   600
         TabIndex        =   6
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "迟到/早退次数:"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1320
         Width           =   1575
      End
      Begin VB.Label Label2 
         Caption         =   "出勤天数:"
         Height          =   255
         Left            =   600
         TabIndex        =   4
         Top             =   840
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "员工编号:"
         Height          =   255
         Left            =   600
         TabIndex        =   3
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frmDutyInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOK_Click()
    Update
End Sub

Private Sub Form_Activate()
    fuzhi
    txtNum.Locked = True
    txtName.Locked = True
End Sub

Private Sub fuzhi()
    Dim adors As New Recordset
    Dim strSQL As String
    Set adors.ActiveConnection = ADOcn
    
    strSQL = "Select * From 考勤表 Where 员工编号='" + txtNum + "'"
    adors.Open strSQL
       If Not adors.EOF Then
       txtNum = adors("员工编号")
       txtName = adors("员工姓名")
       txtDuty = LTrim(adors("出勤天数"))
       txtLeave = LTrim(adors("请假天数"))
       txtLate = LTrim(adors("迟到与早退次数"))
       txtLessWork = LTrim(adors("旷工天数"))
       txtOverWork = LTrim(adors("加班次数"))
       txtMonth = adors("所属月份")
       End If
    
End Sub
Private Sub Update()
    txtNum.Locked = True
    txtName.Locked = True
If txtDuty = "" Or txtLeave = "" Or txtLate = "" Or txtLessWork = "" Or txtOverWork = "" Or txtMonth = "" Then
        MsgBox "请输入完整信息,没有请填“0”!", vbCritical + vbOKOnly, "信息提示"
Else
    Dim strSQL As String
    strSQL = "Update 考勤表 Set 出勤天数=" + txtDuty + ",请假天数= " + txtLeave + ",迟到与早退次数= " + txtLate
    strSQL = strSQL + ",旷工天数=" + txtLessWork + ",加班次数=" + txtOverWork
    strSQL = strSQL + " Where 员工编号='" + txtNum + "'"
    ADOcn.Execute strSQL
    MyRefresh_frmDuty
    Unload Me
End If
End Sub

⌨️ 快捷键说明

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