//return; ////初始化集团打卡记录 //using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) //{ // bllAttendanceSolutionAsign.AsignAttendanceSolutionByOrgID("1", "703dfb3c-d3dc-4b1d-9bf0-3507ba01b716", "2013-09"); // //bllAttendanceSolutionAsign.AsignAttendanceSolutionByOrgID("4", "24a358f9-8539-4faa-aee6-d5cbc8ea450d", "2013-09"); //} //using (ClockInRecordBLL bllClockInRecord = new ClockInRecordBLL()) //{ // EmployeeBLL bll = new EmployeeBLL(); // string strMsg = string.Empty; // List<T_HR_EMPLOYEECLOCKINRECORD> entTempList = new List<T_HR_EMPLOYEECLOCKINRECORD>(); // T_HR_EMPLOYEE emp = bll.GetEmployeeByName("曹利宁"); // DateTime dt= new DateTime(2013, 7, 4); // DateTime dtStar = dt; // DateTime dtEnd = dt.AddDays(1).AddSeconds(-1); // AttendanceRecordBLL attbll = new AttendanceRecordBLL(); // string smtmsg = attbll.CompulsoryInitialization("4", emp.EMPLOYEEID, dtStar, dtEnd); // //T_HR_EMPLOYEECLOCKINRECORD entTemp = new T_HR_EMPLOYEECLOCKINRECORD(); // //entTemp.CLOCKINRECORDID = System.Guid.NewGuid().ToString().ToUpper(); // //entTemp.FINGERPRINTID = idwEnrollNumber.ToString(); // //entTemp.CLOCKID = idwTMachineNumber.ToString(); // //entTemp.PUNCHDATE = DateTime.Parse(dtCurrent.ToString("yyyy-MM-dd") + " " + idwHour.ToString() + ":" + idwMinute.ToString() + ":00"); // //entTemp.PUNCHTIME = idwHour.ToString() + ":" + idwMinute.ToString(); // T_HR_EMPLOYEECLOCKINRECORD record = new T_HR_EMPLOYEECLOCKINRECORD(); // record.CLOCKINRECORDID = System.Guid.NewGuid().ToString(); // record.FINGERPRINTID = emp.FINGERPRINTID; // record.PUNCHDATE = new DateTime(2013,7,4); // record.PUNCHTIME = "08:17"; // entTempList.Add(record); // T_HR_EMPLOYEECLOCKINRECORD record2 = new T_HR_EMPLOYEECLOCKINRECORD(); // record2.CLOCKINRECORDID = System.Guid.NewGuid().ToString(); // record2.FINGERPRINTID = emp.FINGERPRINTID; // record2.PUNCHDATE = new DateTime(2013, 7, 4); // record2.PUNCHTIME = "17:38"; // entTempList.Add(record2); // bllClockInRecord.ImportClockInRdListByWindowsService("", entTempList, dtStar // , dtEnd, "", ref strMsg); //} //} protected void Button1_Click(object sender, EventArgs e) { AttendanceService sv = new AttendanceService(); sv.CalculateEmployeeAttendanceYearlyByEmployeeID("2013", txtEmployeeid.Text); }
protected void Button2_Click(object sender, EventArgs e) { AttendanceService sv = new AttendanceService(); sv.InitYouthLeaveSets(); this.Button2.Enabled = false; this.lblYouth.Text = "初始化完成"; }
/// <summary> /// 员工带薪假实时更新触发 /// </summary> /// <param name="eGFunc"></param> private void CreateLevelDayCountTrigger(IEnumerable<XElement> eGFunc) { if (eGFunc.Count() == 0) { return; } string strAttendSolAsignId = string.Empty; foreach (var item in eGFunc) { if (item.Attribute("Name").Value == "ATTENDANCESOLUTIONASIGNID") { strAttendSolAsignId = item.Attribute("Value").Value; break; } } AttendanceService svcAttend = new AttendanceService(); svcAttend.CreateLevelDayCountWithAll(); }
/// <summary> /// 每月考勤结算触发 /// </summary> /// <param name="eGFunc"></param> private void CalculateAttendMonthlyTrigger(IEnumerable<XElement> eGFunc) { if (eGFunc.Count() == 0) { return; } string strIsCurrentMonth = string.Empty; string strAssignedObjectType = string.Empty; string strAssignedObjectId = string.Empty; foreach (var item in eGFunc) { if (item.Attribute("Name").Value == "ISCURRENTMONTH") { strIsCurrentMonth = item.Attribute("Value").Value; } else if (item.Attribute("Name").Value == "ASSIGNEDOBJECTTYPE") { strAssignedObjectType = item.Attribute("Value").Value; } else if (item.Attribute("Name").Value == "ASSIGNEDOBJECTID") { strAssignedObjectId = item.Attribute("Value").Value; } } AttendanceService svcAttend = new AttendanceService(); //svcAttend.CalculateEmployeeAttendanceMonthly(strIsCurrentMonth, strAssignedObjectType, strAssignedObjectId); }
/// <summary> /// 考勤异常消息提醒 /// </summary> /// <param name="eGFunc"></param> private void AbnormRecordCheckAlarmTrigger(IEnumerable<XElement> eGFunc) { if (eGFunc.Count() == 0) { return; } string strEmployeeId = string.Empty; foreach (var item in eGFunc) { if (item.Attribute("Name").Value == "EMPLOYEEID") { strEmployeeId = item.Attribute("Value").Value; break; } } AttendanceService svcAttend = new AttendanceService(); svcAttend.AbnormRecordCheckAlarm(strEmployeeId); }