mblchange = False
End Sub
Option Explicit
Public sQSql As String
Public mrc As ADODB.Recordset
Public txtSQL As String
Public msgtext As String
Private Sub Check1_Click(Index As Integer)
If Index = 0 Then
Text1(Index).SetFocus
End If
If Index = 1 Then
Text1(Index).SetFocus
Else
Text1(Index).SetFocus
End If
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If Check1(0).Value = https://www.04ip.com/post/vbChecked Then
sQSql = "ygname='"Trim(Text1(0)"")"'"
End If
If Check1(1).Value = https://www.04ip.com/post/vbChecked Then
If Trim(sQSql" ") = "" Then
sQSql = "ygid='"Trim(Text1(1)"")"'"
Else
sQSql = sQSql"and ygid='"Trim(Text1(1)"")"'"
End If
End If
If Check1(2).Value = https://www.04ip.com/post/vbChecked Then
If Trim(sQSql" ") = "" Then
sQSql = "ygdept='"Trim(Text1(2)"")""
Else
sQSql = sQSql"and ygdept='"Trim(Text1(2)"")"'"
End If
End If
If Trim(sQSql" ") = "" Then
frmmanrecord.txtSQL = "select * from dangan"
flagEdit = True
frmmanrecord.ShowTitle
frmmanrecord.ShowData
frmmanrecord.Show
Else
frmmanrecord.txtSQL = "select * from dangan where "sQSql
flagEdit = True
frmmanrecord.ShowTitle
frmmanrecord.ShowData
frmmanrecord.Show
End If
Me.Hide
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 2
Text1(i) = ""
Next
End Sub
人事考勤模块代码
Option Explicit
Dim mblchange As Boolean
Dim mrc As ADODB.Recordset
Public txtSQL As String
Private Sub cboItem_Click(Index As Integer)
Dim msgtext As String
txtSQL = "select ygid,ygname from dangan where ygdept='"Trim(DataCombo1)"'"
Set mrc = ExecuteSQL(txtSQL, msgtext)
mrc.MoveFirst
mrc.Move cboItem(1).ListIndex
txtid = Trim(mrc!ygid)
End Sub
Private Sub cboItem_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
EnterToTab KeyCode
End Sub
Private Sub cboMonth_Click()
Dim dateTemp As Date
dateTemp = DateAdd("d", -1, DateAdd("m", 1, DateSerial(CInt(cboYear), CInt(cboMonth), 1)))
txtItem(0) = Day(dateTemp)
End Sub
Private Sub cboYear_Click()
Dim dateTemp As Date
If Trim(cboMonth" ")"" Then
dateTemp = DateAdd("d", -1, DateAdd("m", 1, DateSerial(CInt(cboYear), CInt(cboMonth), 1)))
txtItem(0) = Day(dateTemp)
End If
End Sub
Private Sub cmdExit_Click()
If mblchange And gintMode3 And cmdSave.Enabled Then
If MsgBox("保存当前记录的变化吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then
Call cmdSave_Click
End If
End If
Unload Me
End Sub
Private Sub cmdSave_Click()
Dim intCount As Integer
Dim sMeg As String
Dim rectemp As Recordset
Dim sSql As String
Dim msgtext As String
For intCount = 0 To 3
If Trim(txtItem(intCount)" ") = "" Then
Select Case intCount
Case 0
sMeg = "本月天数"
Case 2
sMeg = "应出勤天数"
Case 3
sMeg = "出勤"
End Select
If intCount1 Then
sMeg = sMeg"不能为空!"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
txtItem(intCount).SetFocus
Exit Sub
End If
End If
Next intCount
If gintMode = 1 Then
txtSQL = "select * from checkin where kqid='"Trim(txtid)"' and kqdate= '"Format(cboYear.Text"-"cboMonth.Text"-01", "yyyy-mm-dd")"'"
Set mrc = ExecuteSQL(txtSQL, msgtext)
If mrc.EOF = False Then
MsgBox "已经存在该员工在该月的考勤记录!", vbOKOnly + vbExclamation, "警告"
cboMonth.SetFocus
Exit Sub
End If
mrc.Close
- 如何获取云服务器的源代码? 云服务器源代码怎么弄
- 如何设置云服务器的源代码? 云服务器源代码怎么设置
- 如何修改云服务器的源代码? 云服务器源码怎么修改
- 如何寻找云服务器的源代码? 云服务器源码怎么找
- 如何配置云服务器的源代码? 云服务器源码怎么设置
- redis哨兵keepalive 代码redis哨兵
- redis怎么写 redis打字代码
- mongodb开发 mongodb是开放源代码吗
- mysql生成器 mysql代码生成er图
- redis编程 redis代码案例
