数据库课程设计-人事工资管理系统 第9页
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
若图片无法显示请联系QQ3249114,数据库课程设计-人事工资管理系统 第9页免费,转发
请注明源于www.751com.cn
Unload Me
End If
End Sub
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9]