C#考勤管理系统报告
month(RecordTime)=month(getdate()) and day(RecordTime)=day(getdate())", txtEID.Text); cmd = new SqlCommand(commandText, conn);
conn.Open();
int ret = Convert.ToInt32(cmd.ExecuteScalar());
conn.Close();
if (ret > 0)
{
MessageBox.Show("对不起," + empName + ",您已经签退!", "系统提示");
}
else
{
//如果没有签退,在系统中记录用户的签退信息
commandText = string.Format("insert into T_Record(EID,Type,IsLate) values('{0}',{1},{2})", txtEID.Text, 2, early);
cmd = new SqlCommand(commandText, conn);
conn.Open();
cmd.ExecuteNonQuery();
if (early == 0)
{
MessageBox.Show("再见:" + empName , "系统提示");
}
else
{
MessageBox.Show("对不起:" + empName + ",您早退了!", "系统提示");
}
}
}
2.管理人员:
(1)登录界面: