|
发卡
======================================================================================================================================================
private void FaKa()
{
try
{
this.Log("读取表格信息...");
List<User> employeeList = this.GetEmployeeList();
if (employeeList != null)
{
IUserDal userDal = new ManualUserDal(employeeList);
UserEOList list2 = new UserEOList(userDal, 2);
this.Log("正在上传离职人员信息...");
list2.XiaoKa();
string msg = string.Format("待离职总数:{0}条。离职成功数:{1}条。失败数:{2}条。", list2.NeedCancelCount, list2.CanceledCount, list2.NeedCancelCount - list2.CanceledCount);
list2 = new UserEOList(userDal, 2);
this.Log("正在上传在职人员信息...");
this.timerClose = new Timer(new TimerCallback(this.timerCall), this, 0, 0x3e8);
list2.FaKa();
this.ErrorUsers = list2.ErrorUsers;
msg = msg + string.Format("在职人员信息总数:{0}条。待上传总数:{1}条。成功数:{2}条。失败数:{3}条。", new object[] { list2.sunfaka, list2.NeedSendCount, list2.SendedCount, list2.NeedSendCount - list2.SendedCount });
this.Result(msg);
}
base.Invoke(new Action(this.EnableControl));
MessageBox.Show("上传完毕。");
}
catch (Exception exception)
{
this.Log(exception.Message);
base.Invoke(new Action(this.EnableControl));
MessageBox.Show(exception.Message);
}
}
======================================================================================================================================================
刷卡源码
======================================================================================================================================================
private void ShuaKa()
{
try
{
this.Log("读取表格信息...");
List<AttendanceRecord> clockInList = this.GetClockInList();
if (clockInList != null)
{
IAttendanceRecordDal attendanceRecordDal = new ManualAttendanceRecordDal(clockInList);
AttendanceRecordEOList list2 = new AttendanceRecordEOList(attendanceRecordDal, 2);
this.Log("正在上传考勤信息...");
this.timerClose = new Timer(new TimerCallback(this.timerCallshuaka), this, 0, 0x3e8);
list2.Upload();
this.Result(string.Format("在职人员考勤信息总数:{0}条。待上传总数:{1}条。成功:{2}条。失败:{3}条。", new object[] { list2.sunshuaka, list2.NeedShuaKaCount, list2.ShuaKaedCount, list2.NeedShuaKaCount - list2.ShuaKaedCount }));
}
base.Invoke(new Action(this.EnableControl));
MessageBox.Show("上传完毕。");
}
catch (Exception exception)
{
this.Log(exception.Message);
base.Invoke(new Action(this.EnableControl));
MessageBox.Show(exception.Message);
}
}
======================================================================================================================================================
private void LiZhi()
{
List<User> idCard = this.GetIdCard();
if (idCard != null)
{
IUserDal userDal = new ManualUserDal(idCard);
UserEOList list2 = new UserEOList(userDal, 2);
this.Log("正在上传离职人员信息...");
this.timerClose = new Timer(new TimerCallback(this.timerCall), this, 0, 0x3e8);
list2.LiZhi();
string msg = string.Format("待离职总数:{0}条。离职成功数:{1}条。失败数:{2}条。", idCard.Count, list2.CanceledCount, idCard.Count - list2.CanceledCount);
this.Result(msg);
}
base.Invoke(new Action(this.EnableControl));
MessageBox.Show("离职完毕。");
}
======================================================================================================================================================
C#源码 求改易语言
|
|