📄 frm_rpt_kaoqinyc2.frm
字号:
Picture = "Frm_Rpt_KaoQinYC2.frx":1C28A
Key = "excel"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1C5A6
Key = "word"
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1C8C2
Key = "word2"
EndProperty
BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1CA5C
Key = "toleft"
EndProperty
BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1CEAE
Key = "toRight"
EndProperty
BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1D300
Key = "toUp"
EndProperty
BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1D752
Key = "toDown"
EndProperty
BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1DBA4
Key = "write1"
EndProperty
BeginProperty ListImage42 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1DFF6
Key = "write2"
EndProperty
BeginProperty ListImage43 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC2.frx":1E448
Key = "write3"
EndProperty
EndProperty
End
Begin VB.PictureBox Picture2
Height = 0
Left = 0
ScaleHeight = 0
ScaleWidth = 0
TabIndex = 4
Top = 0
Width = 0
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Height = 2175
Left = 0
TabIndex = 9
Top = 4560
Width = 11775
_ExtentX = 20770
_ExtentY = 3836
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
BackColor = 12639424
HeadLines = 1
RowHeight = 15
TabAction = 2
WrapCellPointer = -1 'True
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
SizeMode = 1
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label1
Height = 5295
Left = 2400
TabIndex = 1
Top = 960
Width = 135
End
End
Attribute VB_Name = "Frm_Rpt_KaoQinYC2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mDB As mDB
Dim SpFlg As Boolean
Dim ChejianID As Integer
Public iVar As Integer
Dim sFldString As String
'Dim WithEvents frmX As NM_Bas
Dim strSQL As String
Private adoprimaryRS As ADODB.Recordset
Private strSQL2 As String
Private adoPrimaryRS2 As ADODB.Recordset
Private strSQL3 As String
Private adoPrimaryRS3 As ADODB.Recordset
Private strSQL4 As String
Private adoprimaryRS4 As ADODB.Recordset
Private strSQL5 As String
Private adoPrimaryRS5 As ADODB.Recordset
Private strSQL6 As String
Private adoPrimaryRS6 As ADODB.Recordset
Private strSQL7 As String
Private adoPrimaryRS7 As ADODB.Recordset
Private strSQL8 As String
Private adoPrimaryRS8 As ADODB.Recordset
Private strSQL9 As String
Private adoPrimaryRS9 As ADODB.Recordset
Private Sub DataGrid1_Click()
If adoprimaryRS4.RecordCount = 0 Then Exit Sub
Select Case DataGrid1.Columns(3).Text
Case 1
strSQL = "select a.emplyid as 工号,emplyname as 姓名,holidaydecs as 请假类型,bgndatetime as 开始时间,enddatetime as 结束时间,hours as 请假工时,ratifier as 批准人,makeid as 登记,makedate as 制单时间,(case when isday<>0 then '整天' else '' end) as 是否整天,bzsm as 备注 from holidayreg a,emply b,holidaykind c where a.emplyid=b.emplyid and a.holidayid=c.holidayid and bgndatetime >='" & DTPicker1(0).Value & "' and bgndatetime <'" & DTPicker1(1).Value + 1 & "' and a.emplyid='" & DataGrid1.Columns(0).Text & "'"
Case 2
strSQL = "select a.emplyid as 工号,emplyname as 姓名,evectiondecs as 出差类型,bgndatetime as 开始时间,enddatetime as 结束时间,hours as 出差工时,ratifier as 批准人,makeid as 登记,makedate as 制单时间,(case when isday<>0 then '整天' else '' end) as 是否整天,bzsm as 备注 from evectionreg a,emply b,evectionkind c where a.emplyid=b.emplyid and a.evectionid=c.evectionid and bgndatetime >='" & DTPicker1(0).Value & "' and bgndatetime <'" & DTPicker1(1).Value + 1 & "' and a.emplyid='" & DataGrid1.Columns(0).Text & "'"
Case 3, 4, 6, 7
'Exit Sub
strSQL = "select a.emplyid as 工号,emplyname as 姓名,YuanyinLX as 类型,hours as 工时,ratifier as 批准人,makeid as 登记,makedate as 制单时间,(case when isday<>0 then '整天' else '' end) as 是否整天,bzsm as 备注 from Yuanyin a,emply b where a.emplyid=b.emplyid and Djdate='" & DataGrid1.Columns(2).Text & "' and a.emplyid='" & DataGrid1.Columns(0).Text & "'"
End Select
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
Debug.Print adoprimaryRS.RecordCount
With DataGrid2
.ClearFields
.DefColWidth = 1000
Set .DataSource = adoprimaryRS
' ' .Columns(0).width = 0
' ' .Columns(1).width = 0
' .Columns(2).width = 1000
' .Columns(3).width = 0
.Refresh
End With
End Sub
Private Sub datagrid1_HeadClick(ByVal ColIndex As Integer)
'Sort by clicked column
' With adoprimaryRS4
Static i As Integer
i = i + 1
With adoprimaryRS4
If i Mod 2 Then
.Sort = .Fields(ColIndex).Name & " DESC"
Else
.Sort = .Fields(ColIndex).Name & " ASC"
End If
End With
DataGrid1.Refresh
End Sub
' =====================================================
' =====================================================
Private Sub DataGrid1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys vbTab
SendKeys vbTab
SendKeys vbTab
SendKeys vbTab
End If
End Sub
Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ltmp As Long
Dim sTmp As String
Dim iHour As Single
Dim ssTmp As String
On Error GoTo Err1
If adoprimaryRS4.RecordCount = 0 Then Exit Sub
If Len(DataGrid1.Columns(1).Text) And Button = 2 Then
Select Case DataGrid1.Columns(3).Text
Case 1
ssTmp = "--(请假)"
Case 2
ssTmp = "--(出差)"
Case 3
ssTmp = "--(调休)"
Case 4
ssTmp = "--(特殊原因)"
Case 5
Case 6
ssTmp = "--(漏刷卡)"
Case 7
ssTmp = "--(无原因)"
End Select
ltmp = oMenu.Popup(DataGrid1.Columns(1).Text & ssTmp, "-", "处理方法1--", "处理方法2--", "处理方法3--", "处理方法3--")
Select Case ltmp
' Case 1
' strSQL = "select holidayid,holidaydecs from holidaykind"
' Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
' With Frm_Kao_holiday
' .txtFields(0).Text = DataGrid1.Columns(0).Text
' .txtFields(1).Text = DataGrid1.Columns(1).Text
' .Check1 = 1
' .DTPicker1(0).Value = DataGrid1.Columns(2).Text
' .DTPicker1(1).Value = DataGrid1.Columns(2).Text
' '.txtFields(2).Text = DataGrid1.Columns(0).Text
' Set .DataCombo1(0).RowSource = adoprimaryRS
' .DataCombo1(0).BoundColumn = "holidayid"
' .DataCombo1(0).ListField = "holidaydecs"
' .DataCombo1(0).Refresh
'
' .txtFields(3).Text = UserName
' .Show vbModal
' End With
'
' Case 2
' strSQL = "select evectionid,evectiondecs from evectionkind"
' Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
' With Frm_Kao_Evection
' .txtFields(0).Text = DataGrid1.Columns(0).Text
' .txtFields(1).Text = DataGrid1.Columns(1).Text
' .Check1 = 1
' .DTPicker1(0).Value = DataGrid1.Columns(2).Text
' .DTPicker1(1).Value = DataGrid1.Columns(2).Text
' '.txtFields(2).Text = DataGrid1.Columns(0).Text
' Set .DataCombo1(0).RowSource = adoprimaryRS
' .DataCombo1(0).BoundColumn = "evectionid"
' .DataCombo1(0).ListField = "evectiondecs"
' .DataCombo1(0).Refresh
'
' .txtFields(3).Text = UserName
' .Show vbModal
' End With
'
' Case 3
' With sForm
' .GetFindV2 "请输入原因备注和调休工时:", "调休原因:", "调休工时:"
' sTmp = .GetFindVar1
' iHour = Val(.GetFindVar2)
' End With
'
' If sTmp <> "" Then
' strSQL = "insert into Yuanyin(emplyid,yuanyinLX,Djdate,hours,ratifier,makeid,bzsm) values('" & DataGrid1.Columns(0).Text & "','调休','" & DataGrid1.Columns(2).Text & "'," & iHour & ",'" & UserName & "','" & OperID & "','" & sTmp & "')"
' mDB.ExecuteSQL strSQL
' strSQL = "update wktmrslt set QueRen=3 where emplyid='" & DataGrid1.Columns(0).Text & "' and caldate='" & DataGrid1.Columns(2).Text & "'"
' mDB.ExecuteSQL strSQL
' Toolbar1_ButtonClick Toolbar1.Buttons(3)
' Else
'
' Exit Sub
' End If
' Case 4
' With sForm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -