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

📄 formftfx.frm

📁 人事管理系统 包含考勤
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Formftfx 
   Caption         =   "就餐分析"
   ClientHeight    =   5805
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8190
   LinkTopic       =   "Form1"
   ScaleHeight     =   5805
   ScaleWidth      =   8190
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin MSAdodcLib.Adodc Adcfttime 
      Height          =   330
      Left            =   4920
      Top             =   5280
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adcfttime"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command3 
      Caption         =   "删除重复"
      Height          =   375
      Left            =   4200
      TabIndex        =   11
      Top             =   4800
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   2640
      TabIndex        =   10
      Top             =   4800
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始分析"
      Height          =   375
      Left            =   840
      TabIndex        =   9
      Top             =   4800
      Width           =   1215
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Formftfx.frx":0000
      Height          =   3015
      Left            =   480
      TabIndex        =   8
      Top             =   840
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   5318
      _Version        =   393216
      BackColor       =   -2147483624
      ForeColor       =   16711680
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adcftkq 
      Height          =   330
      Left            =   2880
      Top             =   5280
      Visible         =   0   'False
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   582
      ConnectMode     =   8
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "ftkq"
      Caption         =   "Adcftkq"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adcworktime 
      Height          =   330
      Left            =   720
      Top             =   5280
      Visible         =   0   'False
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "worktime"
      Caption         =   "Adcworktime"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Textdate1 
      Height          =   270
      Left            =   1680
      TabIndex        =   1
      Top             =   480
      Width           =   1095
   End
   Begin VB.TextBox Textdate2 
      Height          =   270
      Left            =   3960
      TabIndex        =   2
      Top             =   480
      Width           =   1215
   End
   Begin MSComctlLib.ProgressBar PBar2 
      Height          =   255
      Left            =   1320
      TabIndex        =   0
      Top             =   4320
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin MSComctlLib.ProgressBar PBar1 
      Height          =   255
      Left            =   1320
      TabIndex        =   3
      Top             =   3960
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin VB.Label Label1 
      Caption         =   "开始日期"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   480
      TabIndex        =   7
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "结束日期"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   2880
      TabIndex        =   6
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "处理进度"
      Height          =   255
      Left            =   480
      TabIndex        =   5
      Top             =   3960
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "总体进度"
      Height          =   255
      Left            =   480
      TabIndex        =   4
      Top             =   4320
      Width           =   735
   End
End
Attribute VB_Name = "Formftfx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim vzgid, vkqtime, vcbid, vgf, vzf, vdate1, vdate2, vdate3
Dim response
Private Sub Command1_Click()
Dim vstime, vetime, time1, time2, fttid, settime
Dim i, j, count, vdays
If Textdate1.Text = "" Or Textdate2.Text = "" Then
response = MsgBox("请输入日期", vbOKOnly, "没有输入日期")
If response = vbOK Then
Textdate1.SetFocus
End If
Else
vdate1 = CDate(Textdate1.Text) '读取日期
vdate3 = CDate(Textdate2.Text)
vdays = vdate3 - vdate1 + 1
Adcfttime.RecordSource = "select * from fttime where fttid<>''"
Adcfttime.Refresh
count = Adcfttime.Recordset.RecordCount
PBar2.Max = count
PBar2.Min = 0
PBar2.Value = 0
j = 0
Do While Not (Adcfttime.Recordset.EOF)
vdate1 = CDate(Textdate1.Text) '读取日期
PBar1.Max = vdays
PBar1.Min = 0
PBar1.Value = 0
i = 0
fttid = 1
vgf = 0
vzf = 1
time1 = Adcfttime.Recordset.Fields("stimeh").Value * 60 + Adcfttime.Recordset.Fields("stimem").Value
time2 = Adcfttime.Recordset.Fields("etimeh").Value * 60 + Adcfttime.Recordset.Fields("etimem").Value
fttid = Adcfttime.Recordset.Fields("fttid").Value
settime = Adcfttime.Recordset.Fields("settime").Value
Do While vdate1 <= vdate3 '日期正确性检查
Adcftkq.RecordSource = "select * from ftkq  where kqdate='" & vdate1 & "'and kqtime>='" & time1 & "' and kqtime<='" & time2 & "'"
Adcftkq.Refresh
Do While Not (Adcftkq.Recordset.EOF) '取得职工信息
vzgid = Adcftkq.Recordset.Fields("zgid").Value
vstime = 720
vetime = 0
Adcworktime.RecordSource = "select * from worktime where workdate='" & vdate1 & "' and zgid='" & vzgid & "'"
Adcworktime.Refresh
If Not Adcworktime.Recordset.EOF Then
vstime = Adcworktime.Recordset.Fields("starttime").Value
vetime = Adcworktime.Recordset.Fields("endtime").Value
End If
If fttid = 1 Then
If vstime = vetime Then
vgf = 1
vzf = 0
Else
If vstime <= settime Then
vgf = 1
vzf = 0
Else
vgf = 0
vzf = 1
End If
End If
Else
If vetime >= settime Then
vgf = 1
vzf = 0
Else
vgf = 0
vzf = 1
End If
End If
Adcftkq.Recordset.Fields("cbid").Value = fttid
Adcftkq.Recordset.Fields("gf").Value = vgf
Adcftkq.Recordset.Fields("zf").Value = vzf
Adcftkq.Recordset.MoveNext
Loop
vdate1 = vdate1 + 1
i = i + 1
PBar1.Value = i
Loop
Adcfttime.Recordset.MoveNext
j = j + 1
PBar2.Value = j
Loop
End If
End Sub


Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Adcftkq.RecordSource = "select * from ftkq  where kqdate='" & vdate1 & "'and kqtime>=660 and kqtime<=810 and zgid='0010' or zgid='0009'"
Adcftkq.Refresh
End Sub

⌨️ 快捷键说明

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