📄 form16.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form Form14
AutoRedraw = -1 'True
Caption = "其他考勤信息列表"
ClientHeight = 8805
ClientLeft = 60
ClientTop = 345
ClientWidth = 8790
Icon = "Form16.frx":0000
LinkTopic = "Form14"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 8805
ScaleWidth = 8790
StartUpPosition = 2 '屏幕中心
Begin TabDlg.SSTab SSTab1
Height = 6735
Left = 240
TabIndex = 1
Top = 1800
Width = 8175
_ExtentX = 14420
_ExtentY = 11880
_Version = 393216
Tab = 2
TabHeight = 520
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TabCaption(0) = "员工请假信息列表"
TabPicture(0) = "Form16.frx":08CA
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "LRecordList"
Tab(0).ControlCount= 1
TabCaption(1) = "员工加班信息列表"
TabPicture(1) = "Form16.frx":08E6
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "ORecordList"
Tab(1).ControlCount= 1
TabCaption(2) = "员工出差信息列表"
TabPicture(2) = "Form16.frx":0902
Tab(2).ControlEnabled= -1 'True
Tab(2).Control(0)= "ERecordList"
Tab(2).Control(0).Enabled= 0 'False
Tab(2).ControlCount= 1
Begin MSFlexGridLib.MSFlexGrid ERecordList
Height = 5415
Left = 360
TabIndex = 4
Top = 840
Width = 7455
_ExtentX = 13150
_ExtentY = 9551
_Version = 393216
Cols = 5
End
Begin MSFlexGridLib.MSFlexGrid ORecordList
Height = 5535
Left = -74760
TabIndex = 3
Top = 840
Width = 7575
_ExtentX = 13361
_ExtentY = 9763
_Version = 393216
Cols = 5
End
Begin MSFlexGridLib.MSFlexGrid LRecordList
Height = 5655
Left = -74520
TabIndex = 2
Top = 840
Width = 7455
_ExtentX = 13150
_ExtentY = 9975
_Version = 393216
Cols = 5
End
End
Begin VB.Image Image2
Height = 1425
Left = 600
Picture = "Form16.frx":091E
Top = 120
Width = 975
End
Begin VB.Image Image1
Height = 1425
Left = 6480
Picture = "Form16.frx":2356
Top = 120
Width = 975
End
Begin VB.Label Label1
Caption = "其它考勤信息"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 735
Left = 2640
TabIndex = 0
Top = 480
Width = 3015
End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub LeaveTopic()
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 ShowLRecord(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 OverTimeTopic()
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 ShowORecord(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 ErrandTopic()
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 ShowERecord(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
Private Sub ERecordList_DblClick() '选择出差记录修改
flag = 4
If Form14.Erecordlist.Rows > 1 Then
kqsql2 = "select * from errand where eid=" & Trim( _
Form14.Erecordlist.TextMatrix(Form14.Erecordlist.Row, 0))
Form13.Show
Form13.ZOrder 0
ErecordID = Trim(Form14.Erecordlist.TextMatrix(Form14.Erecordlist.Row, 0))
Else
MsgBox "没有请假信息!", vbOKOnly + vbExclamation, "警告!"
flag = 1
Form13.Show
End If
End Sub
Private Sub Form_Load()
Dim sql As String
Select Case SSTab1.Caption
Case "员工请假信息列表"
sql = "select * from Ill"
Call LeaveTopic
Call ShowLRecord(sql)
Case "员工加班信息列表"
sql = "select * from OvertimeInfo"
Call OverTimeTopic
Call ShowORecord(sql)
Case "员工出差信息列表"
sql = "select * from errand"
Call ErrandTopic
Call ShowERecord(sql)
End Select
End Sub
Private Sub LRecordList_DblClick() '选择请假记录修改
flag = 2
If Form14.Lrecordlist.Rows > 1 Then
kqsql2 = "select * from Ill where lid=" & Trim( _
Form14.Lrecordlist.TextMatrix(Form14.Lrecordlist.Row, 0))
Form13.Show
Form13.ZOrder 0
LrecordID = Trim(Form14.Lrecordlist.TextMatrix(Form14.Lrecordlist.Row, 0))
Else
MsgBox "没有请假信息!", vbOKOnly + vbExclamation, "警告!"
flag = 1
Form13.Show
End If
End Sub
Private Sub ORecordList_DblClick() '选择加班记录修改
flag = 3
If Form14.Orecordlist.Rows > 1 Then
kqsql2 = "select * from OvertimeInfo where oid=" & Trim( _
Form14.Orecordlist.TextMatrix(Form14.Orecordlist.Row, 0))
Form13.Show
Form13.ZOrder 0
OrecordID = Trim(Form14.Orecordlist.TextMatrix(Form14.Orecordlist.Row, 0))
Else
MsgBox "没有请假信息!", vbOKOnly + vbExclamation, "警告!"
flag = 1
Form13.Show
End If
End Sub
Private Sub SSTab_Click(PreviousTab As Integer)
Dim sql As String
Select Case SSTab1.Caption
Case "员工请假信息列表"
sql = "select * from Ill"
Call LeaveTopic
Call ShowLRecord(sql)
Case "员工加班信息列表"
sql = "select * from OvertimeInfo"
Call OverTimeTopic
Call ShowORecord(sql)
Case "员工出差信息列表"
sql = "select * from errand"
Call ErrandTopic
Call ShowERecord(sql)
End Select
End Sub
Private Sub Lrecordlist_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 And Shift = 0 Then
PopupMenu popmenu.popmenu2
End If
End Sub
Private Sub Orecordlist_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 And Shift = 0 Then
PopupMenu popmenu.popmenu2
End If
End Sub
Private Sub Erecordlist_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 And Shift = 0 Then
PopupMenu popmenu.popmenu2
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -