📄 frm_rpt_kaoqinyc2.frm
字号:
' .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=4 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 6
' 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=6 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 7
' 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=7 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 9
'
' strSQL = "select dptname as 部门,empcrdtm.emplyid as 工号,emplyname as 姓名,cdatetime as 时间 from depart,emply,empcrdtm where depart.dptid=emply.dptid and emply.emplyid=empcrdtm.emplyid and emply.emplyid='" & DataGrid1.Columns(0).Text & "' and cdatetime between '" & DTPicker1(0).Value & " 05:01:00' and '" & DTPicker1(1).Value + 1 & " 05:00:00'" '' order by empcrdtm.emplyid,cdatetime"
' Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
' Dim frmY As New NM_Bas
' With frmY
' .Caption = DataGrid1.Columns(1).Text & DataGrid1.Columns(2).Text & "--原始考勤记录"
' .reload_datagrid adoprimaryRS
' .Show vbModal
' End With
' Set frmY = Nothing
'
End Select
End If
Exit Sub
Err1:
MsgBox Err.Description
End Sub
Public Sub DJ_holiday()
With Frm_Kao_holiday
If .bSave Then
strSQL = "select * from holidayreg where 1=2"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
adoprimaryRS.AddNew
adoprimaryRS.Fields("emplyid").Value = .txtFields(0).Text
adoprimaryRS.Fields("holidayid").Value = .DataCombo1(0).BoundText
If .Check1 = 1 Then
adoprimaryRS.Fields("bgndatetime").Value = .DTPicker1(0).Value
adoprimaryRS.Fields("enddatetime").Value = .DTPicker1(1).Value
adoprimaryRS.Fields("isday").Value = 1
Else
adoprimaryRS.Fields("bgndatetime").Value = .DTPicker1(0).Value & " " & .SETIMER1(0).Text
adoprimaryRS.Fields("enddatetime").Value = .DTPicker1(1).Value & " " & .SETIMER1(1).Text
adoprimaryRS.Fields("isday").Value = 0
End If
adoprimaryRS.Fields("makeid").Value = EmplyID
adoprimaryRS.Fields("hours").Value = IIf(.txtFields(2).Text = "", 0, .txtFields(2).Text)
adoprimaryRS.Fields("ratifier").Value = .txtFields(3).Text
adoprimaryRS.Fields("bzsm").Value = .txtFields(4).Text
adoprimaryRS.Update
strSQL = "update wktmrslt set QueRen=1 where emplyid='" & DataGrid1.Columns(0).Text & "' and caldate='" & DataGrid1.Columns(2).Text & "'"
mDB.ExecuteSQL strSQL
Toolbar1_ButtonClick Toolbar1.Buttons(3)
End If
End With
Unload Frm_Kao_holiday
End Sub
Public Sub DJ_evection()
With Frm_Kao_Evection
If .bSave Then
strSQL = "select * from evectionreg where 1=2"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
adoprimaryRS.AddNew
adoprimaryRS.Fields("emplyid").Value = .txtFields(0).Text
adoprimaryRS.Fields("evectionid").Value = .DataCombo1(0).BoundText
If .Check1 = 1 Then
adoprimaryRS.Fields("bgndatetime").Value = .DTPicker1(0).Value
adoprimaryRS.Fields("enddatetime").Value = .DTPicker1(1).Value
adoprimaryRS.Fields("isday").Value = 1
Else
adoprimaryRS.Fields("bgndatetime").Value = .DTPicker1(0).Value & " " & .SETIMER1(0).Text
adoprimaryRS.Fields("enddatetime").Value = .DTPicker1(1).Value & " " & .SETIMER1(1).Text
adoprimaryRS.Fields("isday").Value = 0
End If
adoprimaryRS.Fields("makeid").Value = EmplyID
adoprimaryRS.Fields("hours").Value = IIf(.txtFields(2).Text = "", 0, .txtFields(2).Text)
adoprimaryRS.Fields("ratifier").Value = .txtFields(3).Text
adoprimaryRS.Fields("bzsm").Value = .txtFields(4).Text
adoprimaryRS.Update
strSQL = "update wktmrslt set QueRen=2 where emplyid='" & DataGrid1.Columns(0).Text & "' and caldate='" & DataGrid1.Columns(2).Text & "'"
mDB.ExecuteSQL strSQL
Toolbar1_ButtonClick Toolbar1.Buttons(3)
End If
End With
Unload Frm_Kao_Evection
End Sub
Private Sub DTPicker1_CloseUp(index As Integer)
Dim d As Date
Dim d1 As Date
Select Case index
Case 0
d = DTPicker1(0).Value
d1 = DateAdd("m", 1, d)
DTPicker1(1).Value = DTPicker1(0).Value ''' DateSerial(Year(d1), Month(d1), 1) - 1
Case 1
End Select
End Sub
' =====================================================
' =====================================================
' =====================================================
' =====================================================
' =====================================================
Private Sub Form_Load()
Set mDB = New mDB
strconnDR = SQLConnKQ
' mDB.InitDB_RY strconnDR
mDB.InitDB_RY SQLConnDR
' SaveSetting "temp", "tempint", "tmpi", 2
''strSQL = "select dptid,dptname from depart"
' strSQL = "select dptid,dptname from depart where ify=1 order by dptname asc"
'Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
'
' With DataCombo1
' Set .RowSource = adoprimaryRS
' .BoundColumn = "dptID"
' .ListField = "dptname"
' .Refresh
' End With
Me.Move 0, 0, width00 - 80, height00 - 80
'strSQL4 = "select ID,iYear,iMonth,emplyid,emplyname,iFen,iDay from NM_ZaGong where iYear=" & Combo1(0).Text & " and iMonth=" & Combo1(1).Text
'Set adoprimaryRS4 = mDB.adoprimaryRS(strSQL4)
'
'
''Reload_DataGrid
'Toolbar1_ButtonClick Toolbar1.Buttons(3)
'Option1(0).Value = True
'Option2(1).Value = True
sFldString = GetSqlString()
DTPicker1(0).Value = Date - 1 ''''' DateSerial(Year(Date), Month(Date), 1)
DTPicker1(1).Value = Date - 1
Toolbar1_ButtonClick Toolbar1.Buttons(3)
End Sub
Private Sub Form_Resize()
If Me.height < 2000 Then Exit Sub
Frame1.width = Me.width - 300 '''- 2060
DataGrid1.Move 100, 1440, Frame1.width, 3015 ''''Me.height - 1880
DataGrid2.Move 100, 4560, Frame1.width, Me.height - 5100
End Sub
' =====================================================
' =====================================================
Private Sub Form_Unload(Cancel As Integer)
mDB.KillDB
Set mDB = Nothing
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error GoTo Err1
Select Case Button.index
Case 1
'
'If DataList1.BoundText = "" Then
'MsgBox "请选择班组。"
'Exit Sub
'End If
'
'Dim sTmp As String
''Dim iPrice As Single
'With sForm
' .GetFindV "请录入员工工号:", "员工工号:"
' sTmp = .GetFindVar1
'' iPrice = .GetFindVar2
'End With
'
'If sTmp <> "" Then
'strSQL = "select emplyname from lz_emply2 where emplyid='" & sTmp & "'"
'Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
'If adoprimaryRS.RecordCount Then
'Dim stmpE As String
' stmpE = adoprimaryRS.Fields("emplyname").Value
'
'strSQL = "insert into NM_ZaGong(ID,iYear,iMonth,emplyid,emplyname) values(" & DataList1.BoundText & "," & Combo1(0).Text & "," & Combo1(1).Text & ",'" & sTmp & "','" & stmpE & "')"
'mDB.ExecuteSQL strSQL
'DataList1_Click
'
'End If
'End If
Case 2
'Dim tDate As Date
'tDate = DateSerial(Combo1(0).Text, Combo1(1).Text, 1)
'strSQL = "select a.ID as 组号,a.emplyid as 工号,a.emplyname as 姓名,b.Banzu as 班组 from NM_ZaGong a,NM_Place b where a.ID=b.ID and a.iYear=" & Year(DateAdd("m", -1, tDate)) & " and a.iMonth=" & Month(DateAdd("m", -1, tDate))
'Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
'
'Set frmX = New NM_Bas
'With frmX
' .Caption = "复制上月收发、杂工名单资料"
' .Reload_DataGrid adoprimaryRS
' .Show vbModal
'End With
Dim frmY As New Frm_Rpt_KaoQinFld
With frmY
.Show vbModal
End With
Set frmY = Nothing
sFldString = GetSqlString
Toolbar1_ButtonClick Toolbar1.Buttons(3)
Case 3
'strSQL = "select * from NMJ_SfSP where iYear=" & Combo1(0).Text & " and iMonth=" & Combo1(1).Text
'Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
'If adoprimaryRS.RecordCount Then
' If adoprimaryRS.Fields("HeFlg3").Value <> 0 And adoprimaryRS.Fields("JsFlg").Value <> 0 Then
' Check1(0).Value = 1
' Check1(1).Value = 1
' Label3(0).Caption = "已审批"
' Label3(3).Caption = "已结算"
' Toolbar1.Buttons(1).Enabled = False
' Toolbar1.Buttons(2).Enabled = False
' Toolbar1.Buttons(4).Enabled = False
'
' SpFlg = False
'
'
' ElseIf adoprimaryRS.Fields("HeFlg3").Value <> 0 Then
' Check1(0).Value = 1
' Label3(0).Caption = "已审批"
'
' Check1(1).Value = 0
' Label3(3).Caption = "未结算"
' Toolbar1.Buttons(1).Enabled = False
' Toolbar1.Buttons(2).Enabled = False
' Toolbar1.Buttons(4).Enabled = False
'
' SpFlg = False
'
'
' Else
'
' Check1(0).Value = 0
' Label3(0).Caption = "待审批"
' Check1(1).Value = 0
' Label3(3).Caption = "未结算"
' Toolbar1.Buttons(1).Enabled = True
' Toolbar1.Buttons(2).Enabled = True
' Toolbar1.Buttons(4).Enabled = True
'
' SpFlg = True
'
' End If
'
'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -