如何通过网格显示员工的出勤率 [英] How to show attendendence of employee through gird

查看:64
本文介绍了如何通过网格显示员工的出勤率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我制作一张供员工参加的表格.

第一个下拉列表包含部门.
第二个下拉列表包含EmployeeName.
第3和第4个包含Mont和year.

然后我有表EmpAttendance.
数据字段为.
ID int
EmpID int
ADATE datetime
状态int(对于缺席= 0,离开= 1,当前= 2)


第一个数据来自数据库并填写网格.
然后在数据库中插入数据.



我有包含日期​​和状态单选按钮列表的网格.
用于插入出席.



首先我们选择部门,然后选择雇员,然后选择月份和年份.
然后网格显示日期和单选按钮列表,以显示缺席,现在和离开.
然后选择日期,然后选择员工的状态(缺席,现在和离开).然后添加数据意味着将数据保存在记录中.

然后从数据库表EmpAttendance将数据填充到网格中.


如何通过代码做到这一点.在C#.net datbase Sqlserver 2000中.

Hi,

I make a form which is for attendance of Employee.

1st Dropdownlist contain the Department .
2nd Dropdownlist contain the EmployeeName .
and 3rd and 4th contain Mont and year.

and then i have table EmpAttendance.
Datafield are .
ID int
EmpID int
ADate datetime
Status int (For Absent = 0,Leave = 1, Present = 2)


first data come from database and fill in grid .
and then insert data in database.



i have grid which contain date and radiobuttonlist for status.
For insert of attendance .



first we choose Department and then Employee and then Month and year .
then grid show date and radiobuttonlist for Absent , present and leave.
and we select date and choose status(Absent , present and leave) of employee .Then Add data means Data Save in record .

And Fill data in grid from database table EmpAttendance.


How can do it for through the code. in C#.net datbase Sqlserver 2000.

推荐答案

首先,您需要弄清楚哪些信息要保留在数据库中,以及如果有多个表则需要如何链接它们.然后,您需要设置一些数据绑定(ADO.NET将为您提供帮助)以使数据进出数据库和表单.由于您似乎已经设计了UI,因此您需要考虑要显示的数据类型和数据量,以及用户正在添加或编辑的数据.
Firstly you need to figure out what information to keep in your database and if multiple tables how they need to be linked. Then you need to set up some data binding (ADO.NET will help you) to get the data into and out of the database and your forms. Since you seem to have designed your UI already you will need to take into account the type and volume of data that you are displaying, and the user is adding or editing.


这篇关于如何通过网格显示员工的出勤率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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