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

📄 fmkqread.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 Fmkqread 
   Caption         =   "考勤数据读取"
   ClientHeight    =   2940
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4650
   LinkTopic       =   "Form1"
   ScaleHeight     =   2940
   ScaleWidth      =   4650
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "删除重复刷卡"
      Height          =   375
      Left            =   2400
      TabIndex        =   10
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   1320
      TabIndex        =   9
      Top             =   1560
      Width           =   855
   End
   Begin MSAdodcLib.Adodc adclskh 
      Height          =   330
      Left            =   3120
      Top             =   5640
      Visible         =   0   'False
      Width           =   2535
      _ExtentX        =   4471
      _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 VB.TextBox Text6 
      Height          =   270
      Left            =   480
      TabIndex        =   8
      Text            =   "Text6"
      Top             =   5400
      Visible         =   0   'False
      Width           =   4335
   End
   Begin VB.TextBox Text5 
      Height          =   270
      Left            =   4800
      TabIndex        =   7
      Text            =   "Text5"
      Top             =   5400
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text4 
      Height          =   270
      Left            =   5160
      TabIndex        =   6
      Text            =   "Text4"
      Top             =   5280
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text3 
      Height          =   270
      Left            =   4200
      TabIndex        =   5
      Text            =   "Text3"
      Top             =   5280
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   2760
      TabIndex        =   4
      Text            =   "Text2"
      Top             =   5280
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   480
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   5280
      Visible         =   0   'False
      Width           =   2295
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   600
      Top             =   5640
      Visible         =   0   'False
      Width           =   2400
      _ExtentX        =   4233
      _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    =   "kqrecord"
      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 MSComctlLib.ProgressBar Progress1 
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   1080
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin VB.CommandButton Command1 
      Caption         =   "读取记录"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "读取进程"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   720
      Width           =   735
   End
End
Attribute VB_Name = "Fmkqread"
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
name = CStr(Date)
year1 = Year(Date)
FileCopy "d:\ant98\Tctclock\KQ\timer.dat", "d:\kqred\ " & name & "timer.dat"
Progress1.Max = linenum
Progress1.Min = 1
Progress1.Value = 1
i = 1
Open "d:\kqred\ " & name & "timer.dat" For Input As 1
Do While Not EOF(1)
Line Input #1, st
Text6.Text = 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)) '机号

Text1.Text = str1
Text2.Text = str2
Text3.Text = str3
Text4.Text = str4
Text5.Text = str5
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 kqrecord 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()

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim sv
Dim vmonth, vyear, vdate
vmonth = Month(Date)
vyear = Year(Date)
vdate = CDate(vyear & "-" & vmonth & "-1")
linenum = 0
Open "d:\ant98\Tctclock\KQ\timer.dat" For Input As 2
'Adodc1.RecordSource = "select * from kqrecord where kqdate>'" & vdate & "'"
'Adodc1.Refresh
'Set adrs = Adodc1.Recordset
'Set Dgdkq.DataSource = adrs
Do While Not EOF(2)
Line Input #2, sv
If sv <> "" Then
linenum = linenum + 1
End If
Loop
Close 2
Text5.Text = linenum

End Sub

⌨️ 快捷键说明

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