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

📄 formftkq.frm

📁 这是一个人事管理软件
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "Msadodc.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Formftkq 
   Caption         =   "饭厅数据读取"
   ClientHeight    =   3030
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7230
   LinkTopic       =   "Form1"
   ScaleHeight     =   3030
   ScaleWidth      =   7230
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command5 
      Caption         =   "删除重复记录"
      Height          =   375
      Left            =   3360
      TabIndex        =   7
      Top             =   1200
      Width           =   1455
   End
   Begin VB.CommandButton Command4 
      Caption         =   "退出"
      Height          =   375
      Left            =   4920
      TabIndex        =   6
      Top             =   1200
      Width           =   735
   End
   Begin MSComctlLib.ProgressBar Progress1 
      Height          =   255
      Left            =   480
      TabIndex        =   4
      Top             =   720
      Width           =   5415
      _ExtentX        =   9551
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin VB.CommandButton Command3 
      Caption         =   "餐厅三"
      Height          =   375
      Left            =   2520
      TabIndex        =   3
      Top             =   1200
      Width           =   735
   End
   Begin VB.CommandButton Command2 
      Caption         =   "餐厅二"
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "餐厅一"
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   1200
      Width           =   855
   End
   Begin MSAdodcLib.Adodc adclskh 
      Height          =   330
      Left            =   2640
      Top             =   2040
      Visible         =   0   'False
      Width           =   2175
      _ExtentX        =   3836
      _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         =   "adclskh"
      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 Adodc1 
      Height          =   330
      Left            =   360
      Top             =   2040
      Visible         =   0   'False
      Width           =   2280
      _ExtentX        =   4022
      _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         =   "Adcrecord"
      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.Label Label2 
      Caption         =   "读取进度"
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   360
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "饭厅数据读取"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "Formftkq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim WithEvents adrs As Recordset
Attribute adrs.VB_VarHelpID = -1
Dim linenum
Private Sub Command1_Click()
Dim response, mystring, year1, name
Dim vzgid, strrq, i
Dim st As String
Dim str1, str2, str3, str4, str5, vkqtime
Dim sv
linenum = 0
Open "D:\ant98\Tctclock\FT1\timer.dat" For Input As 2
Do While Not EOF(2)
Line Input #2, sv
If sv <> "" Then
linenum = linenum + 1
End If
Loop

Close 2
name = CStr(Date)
year1 = Year(Date)
FileCopy "D:\ant98\Tctclock\ft1\timer.dat", "d:\kqbak\ft1\" & name & "timer.dat"
Progress1.Max = linenum
Progress1.Min = 1
Progress1.Value = 1
i = 1
Open "d:\kqbak\ft1\" & name & "timer.dat" For Input As 1
Do While Not EOF(1)
Line Input #1, st
str1 = Mid(st, 9, 10) '卡号
str2 = Mid(st, 22, 10)   '日期
strrq = Mid(st, 27, 5)
str3 = Val(Mid(st, 33, 2)) '时间
str4 = Val(Mid(st, 36, 2)) '分钟
str5 = Val(Mid(st, 3, 1)) '机号

If (str1 <> "") And (str2 <> "") And (str3 <> 0) And (str4 <> 0) And IsDate(str2) = True Then
adclskh.RecordSource = "select * from kh where lskh='" & str1 & "'"
adclskh.Refresh
If Not adclskh.Recordset.EOF Then
vzgid = adclskh.Recordset.Fields("zgid").Value
Else
vzgid = str1
End If
vkqtime = str3 * 60 + str4
Adodc1.RecordSource = "select * from ftkq where kqdate='" & str2 & "'and zgid='" & vzgid & "'and kqtime='" & vkqtime & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("zgid").Value = vzgid
Adodc1.Recordset.Fields("timeh").Value = str3
Adodc1.Recordset.Fields("timem").Value = str4
Adodc1.Recordset.Fields("week").Value = Weekday(str2, 2)
Adodc1.Recordset.Fields("arrid").Value = str5
Adodc1.Recordset.Fields("kqdate").Value = str2
Adodc1.Recordset.Fields("kqtime").Value = str3 * 60 + str4
Adodc1.Recordset.Fields("rq").Value = strrq
Adodc1.Recordset.Fields("donedate").Value = Date
Adodc1.Recordset.update
End If
i = i + 1
Progress1.Value = i
Screen.MousePointer = vbHourglass
End If
Loop
Close 1
Screen.MousePointer = vbDefault
MsgBox ("数据读取完毕")
End Sub

Private Sub Command3_Click()
Dim response, mystring, year1, name
Dim vzgid, strrq, i, sv
Dim st As String
Dim str1, str2, str3, str4, str5, vkqtime
linenum = 0
Open "d:\ant98\Tctclock\ft3\timer.dat" For Input As 2
Do While Not EOF(2)
Line Input #2, sv
If sv <> "" Then
linenum = linenum + 1
End If
Loop
Close 2
name = CStr(Date)
year1 = Year(Date)
FileCopy "d:\ant98\Tctclock\ft3\timer.dat", "d:\kqbak\ft3\" & name & "timer.dat"
Progress1.Max = linenum
Progress1.Min = 1
Progress1.Value = 1
i = 1

Open "d:\kqbak\ft3\" & name & "timer.dat" For Input As 1
Do While Not EOF(1)
Line Input #1, st
str1 = Mid(st, 9, 10) '卡号
str2 = CDate(Mid(st, 22, 10))   '日期
strrq = Mid(st, 27, 5)
str3 = Val(Mid(st, 33, 2)) '时间
str4 = Val(Mid(st, 36, 2)) '分钟
str5 = Val(Mid(st, 3, 1)) '机号
If (str1 <> "") And (str2 <> "") And (str3 <> 0) And (str4 <> 0) And (str5 <> 0) And IsDate(str2) = True Then
adclskh.RecordSource = "select * from kh where lskh='" & str1 & "'"
adclskh.Refresh
If Not adclskh.Recordset.EOF Then
vzgid = adclskh.Recordset.Fields("zgid").Value
Else
vzgid = str1
End If
vkqtime = str3 * 60 + str4
Adodc1.RecordSource = "select * from ftkq where kqdate='" & str2 & "'and zgid='" & vzgid & "'and kqtime='" & vkqtime & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("zgid").Value = vzgid
Adodc1.Recordset.Fields("timeh").Value = str3
Adodc1.Recordset.Fields("timem").Value = str4
Adodc1.Recordset.Fields("week").Value = Weekday(str2, 2)
Adodc1.Recordset.Fields("arrid").Value = str5
Adodc1.Recordset.Fields("kqdate").Value = str2
Adodc1.Recordset.Fields("kqtime").Value = str3 * 60 + str4
Adodc1.Recordset.Fields("rq").Value = strrq
Adodc1.Recordset.Fields("donedate").Value = Date
Adodc1.Recordset.update
End If
i = i + 1
Progress1.Value = i
Screen.MousePointer = vbHourglass
End If
Loop
Close 1
Screen.MousePointer = vbDefault
MsgBox ("数据读取完毕")

End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Command2_Click()
Dim response, mystring, year1, name
Dim vzgid, strrq, i
Dim st As String
Dim str1, str2, str3, str4, str5, vkqtime
Dim sv
linenum = 0
Open "d:\ant98\Tctclock\ft2\timer.dat" For Input As 2
Do While Not EOF(2)
Line Input #2, sv
If sv <> "" Then
linenum = linenum + 1
End If
Loop
Close 2
name = CStr(Date)
year1 = Year(Date)
FileCopy "d:\ant98\Tctclock\ft2\timer.dat", "d:\kqbak\ft2\" & name & "timer.dat"
Progress1.Max = linenum
Progress1.Min = 1
Progress1.Value = 1
i = 1

Open "d:\kqbak\ft2\" & name & "timer.dat" For Input As 1
Do While Not EOF(1)
Line Input #1, st
str1 = Mid(st, 9, 10) '卡号
str2 = Mid(st, 22, 10) '日期
strrq = Mid(st, 27, 5)
str3 = Val(Mid(st, 33, 2)) '时间
str4 = Val(Mid(st, 36, 2)) '分钟
str5 = Val(Mid(st, 3, 1)) '机号

If (str1 <> "") And (str2 <> "") And (str3 <> 0) And (str4 <> 0) And (str5 <> 0) And str2 <> "" And IsDate(str2) Then
adclskh.RecordSource = "select * from kh where lskh='" & str1 & "'"
adclskh.Refresh
If Not adclskh.Recordset.EOF Then
vzgid = adclskh.Recordset.Fields("zgid").Value
Else
vzgid = str1
End If
vkqtime = str3 * 60 + str4
Adodc1.RecordSource = "select * from ftkq where kqdate='" & str2 & "'and zgid='" & vzgid & "'and kqtime='" & vkqtime & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("zgid").Value = vzgid
Adodc1.Recordset.Fields("timeh").Value = str3
Adodc1.Recordset.Fields("timem").Value = str4
Adodc1.Recordset.Fields("week").Value = Weekday(str2, 2)
Adodc1.Recordset.Fields("arrid").Value = str5
Adodc1.Recordset.Fields("kqdate").Value = str2
Adodc1.Recordset.Fields("kqtime").Value = str3 * 60 + str4
Adodc1.Recordset.Fields("rq").Value = strrq
Adodc1.Recordset.Fields("donedate").Value = Date
Adodc1.Recordset.update
End If
i = i + 1
Progress1.Value = i
Screen.MousePointer = vbHourglass
End If
Loop
Close 1
Screen.MousePointer = vbDefault
MsgBox ("数据读取完毕")

End Sub

⌨️ 快捷键说明

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