【正文】
。 ,39。 , amp。 Now() Exit Sub Else = False qjReason = Trim() strSql = insert into TQingJia (departmentId,workerId,qjTime,qjLength,djTime,qjReason) values( _ amp。 39。 amp。 39。 amp。 ccLength amp。 39。 amp。 39。 amp。 workerId amp。 departId amp。 ,祝你生活幸福! MsgBox 登 記成功! Else MsgBox 你已經(jīng)下班,不必再登記! End If Else MsgBox 對不起 ,你還沒有上班,請先上班! , vbOKOnly + vbExclamation, 請遵守公司上下班秩序 End If End If Else MsgBox 不登記 End If End If End If End Sub Private Sub cmdOKCC_Click() Dim departId As Integer Dim workerId As Integer departId = () workerId = () If = Or = Or = Or = Then MsgBox 登記項目不能有空值 Exit Sub ElseIf IsDate() = False Then MsgBox 時間格式不對! . . = True = 時間格式: amp。 amp。 today amp。 workerId amp。 departId amp。 39。 amp。 worktype amp。 optaleave(1).Caption amp。 optastart(0).Caption amp。 ) TransactSQL (strSql) = False = True = 歡迎 amp。, amp。 nowtime amp。,39。 today amp。 ,39。 , amp。 _ values( amp。 optastart(0).Caption amp。 TransactSQL (strSql) . . = False = True = amp。 and workday= amp。 and workerId = amp。 where departmentId = amp。 nowtime amp。 , astartTime =39。 么? , vbOKCancel) = vbOK Then psw = InputBox(請輸入員工密碼: , 輸入密碼) If yanzhengPWD(labwele, psw, workerPsw) = False Then Exit Sub = False Else Call getTime If DateDiff(s, nowtime, astart) = 0 Then worktype = 6 Else worktype = 4 End If If yanzheng(departId, workerId, today) Then If asrecord(departId, workerId, today) Then strSql = update TShangBan set workasType = amp。 ,祝你生活幸福! MsgBox 登記成功! Else MsgBox 你已經(jīng)下班,不必再登記! End If Else MsgBox 對不起,你還沒有上班,請先上班! , vbOKOnly + vbExclamation, 請遵守公司上下班秩序 End If End If Else MsgBox 不登記 End If End If Else If optastart(0).Value = True Then If MsgBox(確定要 amp。 amp。 today amp。 workerId amp。 departId amp。 39。 amp。 worktype amp。 amp。 amp。 ) TransactSQL (strSql) = False = True = 歡迎 amp。 , amp。 , amp。 , amp。 , amp。 _ . . values( amp。 amp。 and workerId= amp。 order by workerId Set rs = TransactSQL(strSql) Do While Not ((2).Value) () = (1).Value Loop = 0 . . End Sub Private Sub cmdOk_Click() Dim psw As String Dim worktype As Integer Dim workerPsw As String Dim pwdCount As Integer pwdCount = 0 Dim departId As Integer Dim workerId As Integer departId = () workerId = () strSql = select workerPsw from TWorker where departmentId= amp。 order by workerId Set rs = TransactSQL(strSql) Do While Not ((2).Value) () = (1).Value Loop = 0 End Sub Private Sub cboYourDepQJ_Click() strSql = Select * from TWorker where departmentId= amp。 order by workerId Set rs = TransactSQL(strSql) Do While Not ((2).Value) () = (1).Value Loop = 0 End Sub Private Sub cboYourDepCC_Click() strSql = Select * from TWorker where departmentId= amp。 m_iDepartId Set rsDep = TransactSQL(strSql) = (0) = (1) = False DisConnect End Sub Public Function SetRowNumber(ByVal p_irownumber As Integer) m_irownumber = p_irownumber End Function Public Function GetRowNumber() As Integer GetRowNumber = m_irownumber End Function 員工考勤登記 Dim strSql As String Dim rs As New Dim today As String Dim qjLength As Double Dim qjTime As String Dim djTime As String Dim qjReason As String Dim ccLength As Double Dim ccTime As String Dim dcTime As String Dim ccArea As String Dim ccContent As String . . Dim nowtime As String Private Sub cboDept_Click() strSql = Select * from TWorker where departmentId= amp。 where departmentId= amp。 m_strDepartName amp。 End If RefreshData adodcDepManage, dgDepManage, strSql End Sub Private Sub dgDepManage_Click() On Error GoTo ShowErr: If IsNull() Then RowNumber = 1 Exit Su