任何人都可以建议我如何从Java每日出勤中产生每月出席人数? [英] Can Anyone Suggest How Can I Generate A Monthly Attendance From A Daily Attendance In Java?

查看:141
本文介绍了任何人都可以建议我如何从Java每日出勤中产生每月出席人数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个代码可以检索员工的ID,firstName,lastName和position。

然后将这些信息插入带有复选框的jtable。

然后检查员工是否在场。

然后有一个保存按钮,当点击时,attedance被保存到数据库中的新表中,该表具有empID,dateAttended,Present(boolean)字段。



现在,我想要做的是每月一次的出勤表,它编制了所有的每日出勤率。

有谁能帮助我如何实现这一目标?非常感谢。

Currently, I have a code that retrieves an employee's ID,firstName,lastName and position.
These pieces of Information are then inserted to a jtable with checkboxes.
Then check if the employee is present or not.
Then there is a save button that when clicked, the attedance is saved into a new table in the database which has the fields empID,dateAttended,Present (boolean).

Now, what I want to do is to have a monthly attendance sheet, which compiles all the daily attendances.
Can anyone please help me on how i can achieve this? big thanks.

推荐答案

这是一项经典的家庭作业 - 请提供代码。



我是请附上 wilkus70 的评论。你每次都会通过一个保存按钮来保存出勤率。

所以你应该要求接收所有 empID 你要求它。



所以这将是



That is a classic homework task - please provide code.

I'd go with the comment of wilkus70. you're saving the attendance each time with a save-button to the DB.
So you should make an request to receive all entries which have the empID you are requesting it for.

so that would be

SELECT * FROM [tablename] WHERE empID IS LIKE '[empID]'



(请注意'掩盖值'


(please notice the ' to mask the value)


这篇关于任何人都可以建议我如何从Java每日出勤中产生每月出席人数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆