课程设计
算法逻辑: (过程设计工具来表示) Private Sub cmdcancel_Click() Unload Me Exit Sub End Sub Private Sub cmddefault_Click() Me.textovertimecom = 200 Me.textovertimespe = 400 Me.texterrand = 200 Me.textabsent = 50 Me.textle = 20 Call setvalue End Sub Private Sub cmdok_Click() If Me.textovertimecom = "" And IsNumeric(Me.textovertimecom) = True Then MsgBox "请输入正常加班工资百分比", vbOKOnly + vbExclamation, "提示" Me.textovertimecom = "" Me.textovertimecom.SetFocus ElseIf Me.textovertimespe = "" And IsNumeric(Me.textovertimespe) = False Then MsgBox "请输入特殊加班工资百分比", vbOKOnly + vbExclamation, "提示" Me.textovertimespe = "" Me.textovertimespe.SetFocus ElseIf Me.texterrand = "" And IsNumeric(Me.texterrand) = False Then MsgBox "请输入出差工资", vbOKOnly + vbExclamation, "提示" Me.texterrand = "" Me.texterrand.SetFocus ElseIf Me.textabsent = "" And IsNumeric(Me.textabsent) = False Then MsgBox "请输入旷工扣发工资", vbOKOnly + vbExclamation, "提示" Me.textabsent = "" Me.textabsent.SetFocus ElseIf Me.textle = "" And IsNumeric(Me.textle) = False Then MsgBox "请输入迟到早退扣发工资", vbOKOnly + vbExclamation, "提示" Me.textle = "" Me.textle.SetFocus Else Call setvalue Call init End If End Sub Private Sub setvalue() Dim sql As String Dim rs As New ADODB.Recordset sql = "select * from 统计" Set rs = getrs(sql, "salary") If rs.EOF = False Then sql = "delete from 统计" Call transactsql(sql, "salary")
课程设计
测试: 1.测试1
测试目的:工资设置功能权限是否区别 测试依据:
最后结论:员工不能设置工资公式,只能查询;管理员可以修改公式。
2.测试2
测试目的;查询功能是否正常 测试依据:
课程设计
最后结论:范围内查询不会出错,超出范围无提示,要改进。