public string AsignAttendanceSolutionByOrgIDAndMonth(string strOrgType, string strOrgId, string strCurYearMonth) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { return bllAttendanceSolutionAsign.AsignAttendanceSolutionByOrgID(strOrgType, strOrgId, strCurYearMonth); } }
public void AsignAttendanceSolutionWithAll() { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { bllAttendanceSolutionAsign.AsignAttendanceSolutionWithAllCompany(); } }
public string AsignAttendanceSolutionByOrgID(string strOrgType, string strOrgId) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { return bllAttendanceSolutionAsign.AsignAttendanceSolutionByOrgID(strOrgType, strOrgId); } }
public string AuditAttSolAsign(string strAttendanceSolutionAsignId, string strCheckState) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { string strActionType = "Manual"; return bllAttendanceSolutionAsign.AuditAttSolAsign(strAttendanceSolutionAsignId, strCheckState, strActionType); } }
public string AsignAttendanceSolution(string strAttendanceSolutionAsignId) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { DateTime dtAsignDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM") + "-1"); T_HR_ATTENDANCESOLUTIONASIGN ent = bllAttendanceSolutionAsign.GetAttendanceSolutionAsignByID(strAttendanceSolutionAsignId); return bllAttendanceSolutionAsign.AsignAttendanceSolution(ent, dtAsignDate); } }
public void GetAttendanceSolutionAsignByEmployeeIDAndDate(string strEmployeeID, DateTime dtStart) { using (AttendanceSolutionAsignBLL bll = new AttendanceSolutionAsignBLL()) { bll.GetAttendanceSolutionAsignByEmployeeIDAndDate(strEmployeeID,dtStart); } }
protected void Page_Load(object sender, EventArgs e) { EmployeeBLL bll = new EmployeeBLL(); bll.GetEmployeeFunds("703dfb3c-d3dc-4b1d-9bf0-3507ba01b716", "24a358f9-8539-4faa-aee6-d5cbc8ea450d"); //LogManager log = new LogManager(); //Exception ex = new Exception("测试发送邮件"); //ErrorLog msg = new ErrorLog(ex); //log.WriteLog(msg); #region 定时触发测试 //AttendanceSolutionAsignBLL bll = new AttendanceSolutionAsignBLL(); //T_HR_ATTENDANCESOLUTIONASIGN ent = new T_HR_ATTENDANCESOLUTIONASIGN(); //bll.UpdateCheckState("T_HR_ATTENDANCESOLUTIONASIGN", "ATTENDANCESOLUTIONASIGNID", "07D79240-4EA1-4397-A0B1-502A10106530", "2"); //string str="<Para FuncName=\"ATTENDANCESOLUTIONASIGNRemindTrigger\" Name=\"ATTENDANCESOLUTIONASIGNID\" Value=\"07D79240-4EA1-4397-A0B1-502A10106530\"></Para>"; //EngineTriggerService sv = new EngineTriggerService(); //sv.EventTriggerProcess(str); #endregion //return; //using (AttendMonthlyBalanceBLL bll = new AttendMonthlyBalanceBLL()) //{ // bll.CalculateEmployeeAttendanceMonthlyByEmployeeID("2013-12", "c962b4ac-0c93-41b3-bb12-2ec93258ceab"); //} //return; //using (AttendMonthlyBalanceBLL bll = new AttendMonthlyBalanceBLL()) //{ // bll.CalculateEmployeeAttendanceMonthlyByEmployeeID("2013-12", "c962b4ac-0c93-41b3-bb12-2ec93258ceab"); //} //LeftOfficeBLL bll = new LeftOfficeBLL(); //bll.UpdateCheckState("T_HR_LEFTOFFICE", "DIMISSIONID", "634c214b-7608-4222-87e8-3ad36a474d6c", "1"); //using (EmployeeEntryBLL bll = new EmployeeEntryBLL()) //{ // EmployeePostBLL ebll = new EmployeePostBLL(); // var entity = bll.GetEmployeeEntryByID("ae0b7a2d-ce96-45a8-8203-7f2996f16f68"); // var ent = ebll.GetEmployeePostByEmployeeID("095bf1f5-7f8a-4c6d-b9ac-1bb55e9d6331"); // bll.EmployeeEntryUpdate(entity, ent); //} return; //using (EmployeeBLL bll = new EmployeeBLL()) //{ // bll.GetEmployeeLeaders("ae4c77df-f734-477a-aee7-09ece0269d7b", 0); //} return; #region 请假消除异常 //测试请假消除异常 //OutApplyBLL bll = new OutApplyBLL(); //bll.updateAllLeve(); //return; // bll.UpdateCheckState("T_HR_EMPLOYEEOUTAPPLIECRECORD", "OVERTIMERECORDID", "826a51bb-21e0-4d49-979f-0fcfbb452c32", "1"); #endregion //EmployeePostChangeBLL bll = new EmployeePostChangeBLL(); //bll.UpdateCheckState("T_HR_EMPLOYEEPOSTCHANGE", "POSTCHANGEID", "33550c08-aa08-47e5-ad65-9db98faf5375", "1"); //EngineService eg = new EngineService(); //string xml = System.IO.File.ReadAllText("c:/HRXML.txt"); //XElement.Parse(xml); //eg.CallWaitAppService(xml); #region 重新初始化考勤 //return; //using (AttendanceRecordBLL bll = new AttendanceRecordBLL()) //{ // DateTime dtstart = new DateTime(2013, 09, 01); // DateTime dtend = dtstart.AddMonths(1).AddDays(-1); // string smtmsg // = bll.CompulsoryInitialization("0", "72b3f128-6cf0-498c-8e70-89d0d66403f2", dtstart, dtend, "0"); // //return smtmsg; //} #endregion 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"); } }
public List<V_ATTENDANCESOLUTIONASIGN> GetAttendanceSolutionAsignRdListByMultSearch(string strOwnerID, string strCheckState, string AttendanceSolutionName, string strAssignedObjectType, string strSortKey,DateTime dtStart,DateTime dtEnd, int pageIndex, int pageSize, ref int pageCount) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { var ents = bllAttendanceSolutionAsign.GetAttendanceSolutionAsignRdListByMultSearch(strOwnerID, strCheckState, AttendanceSolutionName, strAssignedObjectType, strSortKey,dtStart,dtEnd, pageIndex, pageSize, ref pageCount); if (ents == null) { return null; } return ents.ToList(); } }
public List<T_HR_ATTENDANCESOLUTIONASIGN> GetAttendanceSolutionAsignRdListByCreateCompanyId(string createCompanyId) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { var ents = bllAttendanceSolutionAsign.GetAttendanceSolutionAsignRdListByCreateCompanyId(createCompanyId); if (ents == null) { return null; } return ents.ToList(); } }
public T_HR_ATTENDANCESOLUTIONASIGN GetAttendanceSolutionAsignByID(string strAttendanceSolutionAsignId) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { return bllAttendanceSolutionAsign.GetAttendanceSolutionAsignByID(strAttendanceSolutionAsignId); } }
public int CheckAttSolIsExistsAsignRd(string strAttendanceSolutionId, string strCheckStates) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { return bllAttendanceSolutionAsign.CheckAttSolIsExistsAsignRd(strAttendanceSolutionId, strCheckStates); } }
public byte[] OutAttendanceSolutionByMultSearch(string strOwnerID, string strAttendanceSolutionName, string strAssignedObjectType, DateTime dtStart, DateTime dtEnd, string employeeName, string orgValue, out string strMsg) { try { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { byte[] byVac = bllAttendanceSolutionAsign.OutAttendanceSolutionByMultSearch(strOwnerID, strAttendanceSolutionName, strAssignedObjectType, dtStart, dtEnd, employeeName, orgValue, out strMsg); return byVac; } } catch (Exception ex) { Tracer.Debug(ex.ToString()); strMsg = ex.ToString(); return null; } }
public List<V_EMPLOYEEATTENDANCESOLUTIONASIGN> GetAttendanceSolutionAsignBySearchNew(string strOwnerID, string strAttendanceSolutionName, string strAssignedObjectType, DateTime dtStart, DateTime dtEnd, int pageIndex, int pageSize, ref int pageCount, string employeeName, string orgValue) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { var ents = bllAttendanceSolutionAsign.GetAttendanceSolutionAsignBySearchEmployee(strOwnerID, strAttendanceSolutionName, strAssignedObjectType, dtStart, dtEnd, pageIndex, pageSize, ref pageCount, employeeName, orgValue); if (ents == null) { return null; } return ents.ToList(); } }
public List<string> GetAllCompanyIDByAttendSolAsign(string strCurYearMonth) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) { return bllAttendanceSolutionAsign.GetAllCompanyIDByAttendSolAsign(strCurYearMonth); } }
public string ModifyAttendanceSolutionAsign(T_HR_ATTENDANCESOLUTIONASIGN entTemp) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) return bllAttendanceSolutionAsign.ModifyAttSolAsign(entTemp); }
public void GetAttendSolAsignForOutEngineXml(T_HR_ATTENDANCESOLUTIONASIGN entTemp) { using (AttendanceSolutionAsignBLL bll = new AttendanceSolutionAsignBLL()) { bll.GetAttendSolAsignForOutEngineXml(entTemp); } }
public string RemoveAttendanceSolutionAsign(string strAttendanceSolutionAsignId) { using (AttendanceSolutionAsignBLL bllAttendanceSolutionAsign = new AttendanceSolutionAsignBLL()) return bllAttendanceSolutionAsign.DeleteAttSolAsign(strAttendanceSolutionAsignId); }
/// <summary> /// 考勤方案到期提醒 /// </summary> /// <param name="eGFunc"></param> private void ATTENDANCESOLUTIONASIGNRemindTrigger(IEnumerable <XElement> eGFunc) { try { SMT.Foundation.Log.Tracer.Debug("考勤方案分配到期提醒开始"); if (eGFunc.Count() == 0) { return; } string strId = string.Empty; foreach (var item in eGFunc) { if (item.Attribute("Name").Value == "ATTENDANCESOLUTIONASIGNID") { strId = item.Attribute("Value").Value; break; } } AttendanceSolutionAsignBLL attSolutionAsigBll = new AttendanceSolutionAsignBLL(); T_HR_ATTENDANCESOLUTIONASIGN attensolutionAsin = attSolutionAsigBll.GetAttendanceSolutionAsignByID(strId); if (attensolutionAsin != null) { if (attensolutionAsin.ENDDATE >= DateTime.Now.AddDays(-8) && attensolutionAsin.CHECKSTATE == "2") { T_HR_ATTENDANCESOLUTIONASIGN entity = new T_HR_ATTENDANCESOLUTIONASIGN(); Utility.CloneEntity(attensolutionAsin, entity); entity.ATTENDANCESOLUTIONASIGNID = Guid.NewGuid().ToString(); entity.CHECKSTATE = "0"; entity.CREATEDATE = DateTime.Now; entity.UPDATEDATE = DateTime.Now; entity.STARTDATE = entity.ENDDATE.Value.AddDays(1); entity.ENDDATE = entity.ENDDATE.Value.AddYears(1); entity.REMARK = "自动定时触发的考勤方案分配 " + DateTime.Now; //entity.T_HR_ATTENDANCESOLUTION = attensolutionAsin.T_HR_ATTENDANCESOLUTION; if (attensolutionAsin.T_HR_ATTENDANCESOLUTION != null) { entity.T_HR_ATTENDANCESOLUTIONReference.EntityKey = new System.Data.EntityKey("SMT_HRM_EFModelContext.T_HR_ATTENDANCESOLUTION" , "ATTENDANCESOLUTIONID", attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONID); } string msg = "此考勤方案分配将于" + attensolutionAsin.ENDDATE.Value.ToString("yyyy-MM-dd") + "失效,请修改失效时间!"; bool t = attSolutionAsigBll.AddAlarmAttend(entity, msg); if (t) { Tracer.Debug("自动定时触发的考勤方案分配 添加成功,方案名:" + attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONNAME); } else { Tracer.Debug("自动定时触发的考勤方案分配 添加失败,方案名:" + attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONNAME); } } else { SMT.Foundation.Log.Tracer.Debug("考勤方案到期时间为:" + attensolutionAsin.ENDDATE.ToString() + ",不自动生成考勤方案分配。"); } } else { SMT.Foundation.Log.Tracer.Debug("没有获取到考勤方案分配"); } } catch (Exception ex) { SMT.Foundation.Log.Tracer.Debug("考勤方案分配到期提醒出现错误:" + ex.ToString()); } }
/// <summary> /// 考勤方案到期提醒 /// </summary> /// <param name="eGFunc"></param> private void ATTENDANCESOLUTIONASIGNRemindTrigger(IEnumerable<XElement> eGFunc) { try { SMT.Foundation.Log.Tracer.Debug("考勤方案分配到期提醒开始"); if (eGFunc.Count() == 0) { return; } string strId = string.Empty; foreach (var item in eGFunc) { if (item.Attribute("Name").Value == "ATTENDANCESOLUTIONASIGNID") { strId = item.Attribute("Value").Value; break; } } AttendanceSolutionAsignBLL attSolutionAsigBll = new AttendanceSolutionAsignBLL(); T_HR_ATTENDANCESOLUTIONASIGN attensolutionAsin = attSolutionAsigBll.GetAttendanceSolutionAsignByID(strId); if (attensolutionAsin != null) { if (attensolutionAsin.ENDDATE >= DateTime.Now.AddDays(-8) && attensolutionAsin.CHECKSTATE == "2") { T_HR_ATTENDANCESOLUTIONASIGN entity= new T_HR_ATTENDANCESOLUTIONASIGN(); Utility.CloneEntity(attensolutionAsin, entity); entity.ATTENDANCESOLUTIONASIGNID = Guid.NewGuid().ToString(); entity.CHECKSTATE = "0"; entity.CREATEDATE = DateTime.Now; entity.UPDATEDATE = DateTime.Now; entity.STARTDATE = entity.ENDDATE.Value.AddDays(1); entity.ENDDATE = entity.ENDDATE.Value.AddYears(1); entity.REMARK = "自动定时触发的考勤方案分配 "+DateTime.Now; //entity.T_HR_ATTENDANCESOLUTION = attensolutionAsin.T_HR_ATTENDANCESOLUTION; if (attensolutionAsin.T_HR_ATTENDANCESOLUTION != null) { entity.T_HR_ATTENDANCESOLUTIONReference.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_HR_ATTENDANCESOLUTION" , "ATTENDANCESOLUTIONID", attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONID); } string msg = "此考勤方案分配将于"+attensolutionAsin.ENDDATE.Value.ToString("yyyy-MM-dd")+"失效,请修改失效时间!"; bool t = attSolutionAsigBll.AddAlarmAttend(entity, msg); if (t) { Tracer.Debug("自动定时触发的考勤方案分配 添加成功,方案名:" + attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONNAME); } else { Tracer.Debug("自动定时触发的考勤方案分配 添加失败,方案名:" + attensolutionAsin.T_HR_ATTENDANCESOLUTION.ATTENDANCESOLUTIONNAME); } } else { SMT.Foundation.Log.Tracer.Debug("考勤方案到期时间为:" + attensolutionAsin.ENDDATE.ToString() + ",不自动生成考勤方案分配。"); } } else { SMT.Foundation.Log.Tracer.Debug("没有获取到考勤方案分配"); } } catch (Exception ex) { SMT.Foundation.Log.Tracer.Debug("考勤方案分配到期提醒出现错误:" + ex.ToString()); } }