VB+access企业工资管理系统 第6页
选择“工资信息管理”—>“出勤统计”菜单,在统计出勤记录窗体中选择需要统计记录的月份。
firstday = Year(Date) & "-" & Me.commonth.Text & "-1"
days = DateDiff("d", Year(Date) & "-" & Me.commonth.Text & "-1", _
Year(Date) & "-" & Me.commonth.Text + 1 & "-1")
lastday = Year(Date) & "-" & Me.commonth.Text & "-" & days
sql = "select * from attendancestatistics where recordmonth between #"
sql = sql & firstday & "# and #" & lastday & "#"
Set rsrecord = getrs(sql, "salary")
If rsrecord.EOF = False Then
MsgBox "已经统计", vbOKOnly + vbExclamation, "提示"
frmaresult.Show
frmaresult.ZOrder 0
rsrecord.Close
Unload Me
Exit Sub
End If
sql = "select * from attendanceinfo where adate between #"
sql = sql & firstday & "# and #" & lastday & "#"
Set rsrecord = getrs(sql, "person")
If rsrecord.EOF = False Then
sql = "select sid,sname from stuffinfo order by sid"
Set rsperson = getrs(sql, "person")
选择月份后单击“确定”按钮,如果系统已经统计过该月份的记录,那么会出现如下图所示的统计结果信息列表。如果系统没有统计过,那么系统就会开始统计记录,然后显示如图所示的统计结果信息列表。
If strusername <> "admin" Then
sql = "select sid from stuffinfo where sname='" & strusername & "'"
Set rs = getrs(sql, "salary")
sd = rs(0)
sql = "select * from attendancestatistics where stuffid='" & sd & "'"
Me.Adodc1.ConnectionString ="provider=microsoft.jet.oledb.4.0;Datasource="& App.Path & "\salary.mdb"
Me.Adodc1.RecordSource = sql
Me.Adodc1.Refresh
Set Me.DataGrid1.DataSource = Me.Adodc1.Recordset
Me.DataGrid1.Refresh
Else
sql = "select * from attendancestatistics"
Me.Adodc1.ConnectionString="provider=microsoft.jet.oledb.4.0;Datasource="& App.Path & "\salary.mdb"
Me.Adodc1.RecordSource = sql
Me.Adodc1.Refresh
Set Me.DataGrid1.DataSource = Me.Adodc1.Recordset
Me.DataGrid1.Refresh
End If
选择“工资信息管理”—>“计算实发工资”菜单,在这个窗体中选择需要统计的月份。选择统计月份后,单击“开始统计”按钮,系统如果已经统计了该月份的工资,系统会显示工资信息列表窗体。如果系统还没有统计工资,那么系统开始统计工资,然后在信息结果列表窗体中显示统计结果。
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页
VB+access企业工资管理系统 第6页下载如图片无法显示或论文不完整,请联系qq752018766