《人事管理系统程序清单.doc》由会员分享,可在线阅读,更多相关《人事管理系统程序清单.doc(33页珍藏版)》请在金锄头文库上搜索。
1、附录: 毕业设计程序清单设计题目 人事管理系统 教 学 班: 学生姓名: 学 号: 指导教师: 完成日期: Option ExplicitDim Bupdata As BooleanDim i As IntegerPrivate Sub Cmbdegree_Click() If Cmbdegree.Text = 定制 Then FrmTable.Show Cmbdegree.ListIndex = 0 End If End SubPrivate Sub Cmbdepart_Click() If Cmbdepart.Text = 定制 Then FrmTable.Show Cmbdepart.L
2、istIndex = 0 End If End SubPrivate Sub CmdAddNew_Click() If CmdAddNew.Caption = 添加 Then CmdAddNew.Caption = 确认 CmdDel.Enabled = False CmdOK.Enabled = False DataA.ReadOnly = False For i = 1 To 12 If Txt(i).Text = Then Txt(i).Text = 0 DataA.Recordset.Fields(i) = 0 Next i DataA.Recordset.AddNew Txt(0).
3、Locked = False If FrmMain.cutable = employee Then DataA.Recordset.Fields(13) = frmLogin.EmploID DataA.Recordset.Fields(14) = Now If Opsex(0) Then DataA.Recordset.Fields(4) = 男 Else DataA.Recordset.Fields(4) = 女 End If DataA.Recordset.Fields(7) = Cmbdegree.Text DataA.Recordset.Fields(8) = Cmbdepart.T
4、ext ElseIf FrmMain.cutable = leave Then DataA.Recordset.Fields(8) = frmLogin.EmploID DataA.Recordset.Fields(9) = Now Else DataA.Recordset.Fields(13) = frmLogin.EmploID DataA.Recordset.Fields(14) = Now End If Txt(0).SetFocus Else OK If Txt(0).Text = Then MsgBox 不可以为空 Txt(0).SetFocus Exit Sub End If F
5、or i = 1 To 12 If Txt(i).Text = Then Txt(i).Text = 0 DataA.Recordset.Fields(i) = 0 Next i If FrmMain.cutable = employee Then DataB.Recordset.FindFirst 职工编号= + Txt(0).Text If Not DataB.Recordset.NoMatch Then MsgBox 职员编号重复 Txt(0).Text = Txt(0).SetFocus Exit Sub End If ElseIf FrmMain.cutable = leave Th
6、en DataB.Recordset.FindFirst 假条编号= + Txt(0).Text If Not DataB.Recordset.NoMatch Then MsgBox 假条编号重复 Txt(0).Text = Txt(0).SetFocus Exit Sub End If Else For i = 4 To 10 If Not IsNumeric(Txt(i).Text) Then MsgBox not a number Txt(i).SetFocus Exit Sub End If Next i DataB.Recordset.FindFirst 工资编号= + Txt(0)
7、.Text If Not DataB.Recordset.NoMatch Then MsgBox 工资编号重复 Txt(0).Text = Txt(0).SetFocus Exit Sub End If End If DataA.Recordset.Update DataA.Recordset.MoveLast FrmMain.DataA.Refresh FrmMain.DataB.Refresh DataB.Refresh CmdAddNew.Caption = 添加 CmdDel.Enabled = True CmdOK.Enabled = True End If End SubPriva
8、te Sub CmdCacel_Click() If CmdAddNew.Caption = 确认 Then DataA.Recordset.CancelUpdate End If FrmMain.Enabled = True FrmMain.SetFocus Unload Me FrmMain.DataA.Refresh If FrmMain.cutable = employee Then FrmMain.DBGA.Columns(性别).Button = True FrmMain.DBGA.Columns(学历).Button = True FrmMain.DBGA.Columns(部门).Button = TrueEnd IfEnd SubPrivate Sub CmdDel_Click() DataA.ReadOnly = False DataA.Recordset.Delete DataA.Recordset.MoveNext If DataA.Recordset.EOF Then DataA.Recordset.MoveLast End If FrmMain.DataA.RefreshEnd SubPrivate Sub cmdOK_Click() If Txt(0).Tex