人事工资管理系统(ER图+数据流程图+系统功能模块结构图+源代码) 第7页


人事工资管理系统(ER图+数据流程图+系统功能模块结构图+源代码) 第7页
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 intCount <> 1 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") & "'"
If mrc.EOF = False Then
MsgBox "已经存在该员工在该月的考勤记录!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
mrc.Close
txtSQL = "delete * from renshi1 where id='" & Trim(Text(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, msgtext)
txtSQL = "select * from renshi1"
Set mrc = ExecuteSQL(txtSQL, msgtext)
For intCount = 0 To 2
mrc.Fields(intCount) = Trim(Text(intCount))
Next intCount
mrc.Update
MsgBox "添加记录成功!", vbOKOnly, "提示"
frmrenshi.ZOrder 1
frmrenshi.Show
Command1.Enabled = True
first.Enabled = True

                                                                沈  阳  大  学
课程设计说明书                 NO.25
last.Enabled = True
End If
If gintMode = 2 Then
txtSQL = "select * from renshi1"
Set mrc = ExecuteSQL(txtSQL, msgtext)
mrc.Fields(intCount) = Text(intCount).Text
mrc.Update
MsgBox "记录修改成功!", vbOKOnly, "提示"
cmdchange.Enabled = True
Command1.Enabled = True
cmddelete.Enabled = True
End If
mrc.Close
End If
txtSQL = "select * from department"
Set mrc = ExecuteSQL(txtSQL, msgtext)
mrc.AddNew
For intCount = 0 To 2
mrc.Fields(intCount) = Trim(Text(intCount))
mrc.Update
MsgBox "记录添加成功!", vbOKOnly + vbExclamation, "警告"
cmdok.Enabled = True
cmdchange.Caption = "修改"
For i = 0 To 2
Text(i).Text = ""mblchange = False
Next i frmbumen.Show
ElseIf cmdchange.Caption = "修改" Then
txtSQL = "select * from department where dpid='" & Trim(Text(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, msgtext)
For i = 0 To 2
mrc.Fields(i) = Text(i).Text
Next i
mrc.Update
    For intCount = 0 To 2
Text(intCount).Enabled = True
mybookmark = mrc.Bookmark
Next intCount
MsgBox "记录修改成功!", vbOKOnly + vbExclamation, "警告"
Unload Me
End If
End Sub

上一页  [1] [2] [3] [4] [5] [6] [7] 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有