📄 frmkqcheckresult.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmkqcheckresult
Caption = "考勤查询结果列表"
ClientHeight = 11010
ClientLeft = 60
ClientTop = 345
ClientWidth = 15240
ControlBox = 0 'False
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 11010
ScaleWidth = 15240
WindowState = 2 'Maximized
Begin MSFlexGridLib.MSFlexGrid Erecordlist
Height = 1995
Left = 120
TabIndex = 7
Top = 8640
Width = 15015
_ExtentX = 26485
_ExtentY = 3519
_Version = 393216
Cols = 5
FixedCols = 0
BackColor = -2147483647
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSFlexGridLib.MSFlexGrid Orecordlist
Height = 2040
Left = 120
TabIndex = 5
Top = 6120
Width = 15060
_ExtentX = 26564
_ExtentY = 3598
_Version = 393216
Cols = 5
FixedCols = 0
BackColor = -2147483647
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSFlexGridLib.MSFlexGrid Lrecordlist
Height = 1995
Left = 120
TabIndex = 3
Top = 3720
Width = 15060
_ExtentX = 26564
_ExtentY = 3519
_Version = 393216
Cols = 5
FixedCols = 0
BackColor = -2147483647
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSFlexGridLib.MSFlexGrid Arecordlist
Height = 2625
Left = 120
TabIndex = 1
Top = 480
Width = 15045
_ExtentX = 26538
_ExtentY = 4630
_Version = 393216
Cols = 9
FixedCols = 0
BackColor = -2147483647
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label4
Caption = "出差查询结果列表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 6
Top = 8160
Width = 2655
End
Begin VB.Label Label3
Caption = "加班查询结果列表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 255
Left = 120
TabIndex = 4
Top = 5760
Width = 2655
End
Begin VB.Label Label2
Caption = "请假查询结果列表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 2
Top = 3240
Width = 2655
End
Begin VB.Label Label1
Caption = "出勤查询结果列表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 120
TabIndex = 0
Top = 0
Width = 2655
End
End
Attribute VB_Name = "frmkqcheckresult"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Sub Form_Load()
End Sub
Public Sub ATopic()
Dim i As Integer
With Arecordlist '设置表头
.TextMatrix(0, 0) = "记录编号"
.TextMatrix(0, 1) = "员工编号"
.TextMatrix(0, 2) = "员工姓名"
.TextMatrix(0, 3) = "出勤日期"
.TextMatrix(0, 4) = "进出标志"
.TextMatrix(0, 5) = "上班时间"
.TextMatrix(0, 6) = "下班时间"
.TextMatrix(0, 7) = "迟到次数"
.TextMatrix(0, 8) = "早退次数"
For i = 0 To 8 '设置所有表格对齐方式
.ColAlignment(i) = 4
Next i
For i = 0 To 8 '设置每列宽度
.ColWidth(i) = 1500
Next i
End With
End Sub
Public Sub ShowAResult(query As String)
Dim rsAttendance As New ADODB.Recordset
Set rsAttendance = TransactSQL(query)
If rsAttendance.EOF = False Then
With Arecordlist
.Rows = 1
While Not rsAttendance.EOF
.Rows = .Rows + 1
.TextMatrix(.Rows - 1, 0) = rsAttendance(0)
.TextMatrix(.Rows - 1, 1) = rsAttendance(1)
.TextMatrix(.Rows - 1, 2) = rsAttendance(2)
.TextMatrix(.Rows - 1, 3) = rsAttendance(3)
.TextMatrix(.Rows - 1, 4) = rsAttendance(4)
If IsNull(rsAttendance(5)) = True Then
.TextMatrix(.Rows - 1, 5) = ""
Else
.TextMatrix(.Rows - 1, 5) = rsAttendance(5)
End If
If IsNull(rsAttendance(6)) = True Then
.TextMatrix(.Rows - 1, 6) = ""
Else
.TextMatrix(.Rows - 1, 6) = rsAttendance(6)
End If
.TextMatrix(.Rows - 1, 7) = rsAttendance(7)
.TextMatrix(.Rows - 1, 8) = rsAttendance(8)
rsAttendance.MoveNext
Wend
End With
rsAttendance.Close
End If
End Sub
Public Sub LTopic()
Dim i As Integer
With LRecordList '设置请假信息列表表头
.TextMatrix(0, 0) = "记录编号"
.TextMatrix(0, 1) = "员工姓名"
.TextMatrix(0, 2) = "病假天数"
.TextMatrix(0, 3) = "事假天数"
.TextMatrix(0, 4) = "开始时间"
For i = 0 To 4 '设置对齐方式
.ColAlignment(i) = 4
Next i
For i = 0 To 4 '设置列宽
.ColWidth(i) = 1500
Next i
End With
End Sub
Public Sub ShowLResult(query As String) '显示请假信息
Dim rsLeave As New ADODB.Recordset
Set rsLeave = TransactSQL(query)
If rsLeave.EOF = False Then
With LRecordList
.Rows = 1
While Not rsLeave.EOF
.Rows = .Rows + 1
.TextMatrix(.Rows - 1, 0) = rsLeave(0)
.TextMatrix(.Rows - 1, 1) = rsLeave(1)
.TextMatrix(.Rows - 1, 2) = rsLeave(2)
.TextMatrix(.Rows - 1, 3) = rsLeave(3)
.TextMatrix(.Rows - 1, 4) = rsLeave(4)
rsLeave.MoveNext
Wend
rsLeave.Close
End With
End If
End Sub
Public Sub OTopic()
Dim i As Integer
With ORecordList '设置加班信息列表表头
.TextMatrix(0, 0) = "记录编号"
.TextMatrix(0, 1) = "员工姓名"
.TextMatrix(0, 2) = "特殊加班天数"
.TextMatrix(0, 3) = "正常加班天数"
.TextMatrix(0, 4) = "加班时间"
For i = 0 To 4 '设置对齐方式
.ColAlignment(i) = 4
Next i
For i = 0 To 4 '设置列宽
.ColWidth(i) = 1800
Next i
End With
End Sub
Public Sub ShowOResult(query As String) '显示加班信息
Dim rsOvertime As New ADODB.Recordset
Set rsOvertime = TransactSQL(query)
If rsOvertime.EOF = False Then
With ORecordList
.Rows = 1
While Not rsOvertime.EOF
.Rows = .Rows + 1
.TextMatrix(.Rows - 1, 0) = rsOvertime(0)
.TextMatrix(.Rows - 1, 1) = rsOvertime(1)
.TextMatrix(.Rows - 1, 2) = rsOvertime(2)
.TextMatrix(.Rows - 1, 3) = rsOvertime(3)
.TextMatrix(.Rows - 1, 4) = rsOvertime(4)
rsOvertime.MoveNext
Wend
rsOvertime.Close
End With
End If
End Sub
Public Sub ETopic()
Dim i As Integer
With ERecordList '设置出差信息列表表头
.TextMatrix(0, 0) = "记录编号"
.TextMatrix(0, 1) = "员工姓名"
.TextMatrix(0, 2) = "出差天数"
.TextMatrix(0, 3) = "出差目的地"
.TextMatrix(0, 4) = "出差开始时间"
For i = 0 To 4 '设置对齐方式
.ColAlignment(i) = 4
Next i
For i = 0 To 4 '设置列宽
.ColWidth(i) = 2000
Next i
End With
End Sub
Public Sub ShowEReslut(query As String) '显示出差信息
Dim rsErrand As New ADODB.Recordset
Set rsErrand = TransactSQL(query)
If rsErrand.EOF = False Then
With ERecordList
.Rows = 1
While Not rsErrand.EOF
.Rows = .Rows + 1
.TextMatrix(.Rows - 1, 0) = rsErrand(0)
.TextMatrix(.Rows - 1, 1) = rsErrand(1)
.TextMatrix(.Rows - 1, 2) = rsErrand(2)
.TextMatrix(.Rows - 1, 3) = rsErrand(3)
.TextMatrix(.Rows - 1, 4) = rsErrand(4)
rsErrand.MoveNext
Wend
rsErrand.Close
End With
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -