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

📄 frmshuju.frm

📁 用microsoft vb6.0写的上班考勤系统!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   7215
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9960
   LinkTopic       =   "Form1"
   ScaleHeight     =   7215
   ScaleWidth      =   9960
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame6 
      Height          =   855
      Left            =   600
      TabIndex        =   13
      Top             =   1200
      Width           =   2415
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   495
         Left            =   1320
         TabIndex        =   15
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "保存"
         Height          =   495
         Left            =   240
         TabIndex        =   14
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.OptionButton Option2 
      Caption         =   "设置月休息天数"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   6240
      TabIndex        =   12
      Top             =   2160
      Width           =   2295
   End
   Begin VB.OptionButton Option1 
      Caption         =   "设置迟到时间及所扣工资"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1440
      TabIndex        =   11
      Top             =   2160
      Width           =   3255
   End
   Begin VB.Frame Frame4 
      Height          =   4215
      Left            =   6120
      TabIndex        =   7
      Top             =   2640
      Visible         =   0   'False
      Width           =   4695
      Begin VB.Frame Frame5 
         Height          =   1455
         Left            =   240
         TabIndex        =   8
         Top             =   1200
         Width           =   4215
         Begin VB.TextBox Text5 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   735
            Left            =   1920
            TabIndex        =   10
            Top             =   480
            Width           =   1455
         End
         Begin VB.Label Label7 
            Caption         =   "每月休息天数:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   9
            Top             =   720
            Width           =   1695
         End
      End
   End
   Begin VB.Frame Frame1 
      Height          =   4215
      Left            =   600
      TabIndex        =   1
      Top             =   2640
      Visible         =   0   'False
      Width           =   5415
      Begin VB.Frame Frame3 
         Height          =   1095
         Left            =   240
         TabIndex        =   16
         Top             =   2100
         Width           =   4935
         Begin VB.TextBox Text3 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   405
            Left            =   2760
            TabIndex        =   18
            Top             =   360
            Width           =   1935
         End
         Begin VB.Label Label4 
            Caption         =   "加班起始时间:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   720
            TabIndex        =   17
            Top             =   360
            Width           =   2175
         End
      End
      Begin VB.Frame Frame2 
         Height          =   1335
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   4935
         Begin VB.TextBox Text2 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   405
            Left            =   2760
            TabIndex        =   6
            Top             =   765
            Width           =   1935
         End
         Begin VB.TextBox Text1 
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   405
            Left            =   2760
            TabIndex        =   3
            Top             =   240
            Width           =   1935
         End
         Begin VB.Label Label3 
            Caption         =   "所扣工资:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   1320
            TabIndex        =   5
            Top             =   840
            Width           =   1575
         End
         Begin VB.Label Label2 
            Caption         =   "迟到早退达到时间:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   14.25
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   120
            TabIndex        =   4
            Top             =   330
            Width           =   2655
         End
      End
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000012&
      Caption         =   "设置考勤数据"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   42
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   855
      Left            =   3480
      TabIndex        =   0
      Top             =   120
      Width           =   5175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public RstShuju As ADODB.Recordset
Public Cnnshuju As ADODB.Connection

Private Sub Command1_Click()
If Option2.Value = True Then
  Set RstShuju = New ADODB.Recordset
  RstShuju.Open "select * from setjiashu", Cnnshuju, adOpenStatic, adLockBatchOptimistic, adCmdText
  If RstShuju.EOF Then
    RstShuju.AddNew
      RstShuju.Fields(0) = Text5.Text
    
    RstShuju.UpdateBatch
  Else
    RstShuju.Fields(0) = Text5.Text
    RstShuju.UpdateBatch
    
  End If

End If

If Option1.Value = True Then
   If Text1.Text = "" Or Text2.Text = "" Then
     MsgBox "所填数据不能为空!!", vbOKOnly, "提醒!!"
   End If
   Set RstShuju = New ADODB.Recordset
   RstShuju.Open "select * from chidaotime where time='" + Text1.Text + "'", Cnnshuju, adOpenStatic, adLockBatchOptimistic, adCmdText
   If RstShuju.EOF Then
     RstShuju.AddNew
       RstShuju.Fields(0) = Text1.Text
       RstShuju.Fields(1) = Text2.Text
     RstShuju.UpdateBatch
   Else
     RstShuju.Fields(1) = Text2.Text
     RstShuju.UpdateBatch
   End If
   
   If Text3.Text <> "" Then
     Set RstShuju = New ADODB.Recordset
     RstShuju.Open "select * from jiabantime ", Cnnshuju, adOpenStatic, adLockBatchOptimistic, adCmdText
     If RstShuju.EOF Then
       RstShuju.AddNew
         RstShuju.Fields(0) = Text3.Text
       RstShuju.UpdateBatch
     Else
       RstShuju.Fields(0) = Text3.Text
       RstShuju.UpdateBatch
     
     End If
   End If
   MsgBox "数据已保存!!", vbOKOnly, "提醒!!"
End If

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Set Cnnshuju = New ADODB.Connection
Cnnshuju.Open "kaoqin", "andy", "1234"
'Set Rstshuju = New ADODB.Recordset

Option1.Value = False
Option2.Value = False
End Sub

Private Sub Option1_Click()
If Option1.Value = True Then
  Frame1.Visible = True
  Frame4.Visible = False
End If


End Sub

Private Sub Option2_Click()
If Option2.Value = True Then
  Frame4.Visible = True
  Frame1.Visible = False
End If

End Sub

⌨️ 快捷键说明

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