Ejemplo n.º 1
0
 protected override void Validation()
 {
     _EmployeeSalaryList = new List <EmployeeSalary>();
     //获取所有员工
     _EmployeeList = _GetEmployee.GetEmployeeWithCurrentMonthDimissionEmployee(_SalaryTime, _CompanyId,
                                                                               _DepartmentID);
     foreach (Employee employee in _EmployeeList)
     {
         //获取员工当月工资
         EmployeeSalaryHistory salaryHistory =
             _DalEmployeeSalary.GetEmployeeSalaryHistoryByEmployeeIdAndDateTime(employee.Account.Id, _SalaryTime);
         //判断当月工资是否存在
         if (salaryHistory == null)
         {
             throw new ApplicationException(employee.Account.Name +
                                            BllUtility.GetResourceMessage(
                                                BllExceptionConst._Employee_Salary_NotExist));
         }
         //当月工资是否已封帐
         if (Equals(salaryHistory.EmployeeSalaryStatus, EmployeeSalaryStatusEnum.AccountClosed))
         {
             throw new ApplicationException(employee.Account.Name +
                                            BllUtility.GetResourceMessage(
                                                BllExceptionConst._Employee_Salary_Closed));
         }
         var employeeSalary = new EmployeeSalary(employee.Account.Id);
         employeeSalary.Employee = employee;
         employeeSalary.EmployeeSalaryHistoryList = new List <EmployeeSalaryHistory>();
         employeeSalary.EmployeeSalaryHistoryList.Add(salaryHistory);
         _EmployeeSalaryList.Add(employeeSalary);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        public static string GetCharacterNameByType(AssessCharacterType assessCharacterType)
        {
            switch (assessCharacterType)
            {
            case AssessCharacterType.Normal:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterNormal));

            case AssessCharacterType.NormalForContract:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterNormalForContract));

            case AssessCharacterType.ProbationI:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterProbationI));

            case AssessCharacterType.ProbationII:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterProbationII));

            case AssessCharacterType.PracticeI:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterPracticeI));

            case AssessCharacterType.PracticeII:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterPracticeII));

            case AssessCharacterType.Abnormal:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterAbnormal));

            case AssessCharacterType.Annual:
                return(BllUtility.GetResourceMessage(BllExceptionConst._CharacterAnnual));

            default:
                return("");
            }
        }
Ejemplo n.º 3
0
 private void SendEmailToHR(List <MailBody> mailBodyListToHR)
 {
     foreach (MailBody mail in mailBodyListToHR)
     {
         mail.Subject = BllUtility.GetResourceMessage(BllExceptionConst._Email_To_HR_For_Contract);
         mail.Body    = "以下员工合同即将到期" + Environment.NewLine + mail.Body;
         _IMailGateWay.Send(mail);
     }
 }
Ejemplo n.º 4
0
        private void SendEmailToEmployee(Employee employee)
        {
            MailBody      mailBody = new MailBody();
            List <string> mailTo   = new List <string>();

            mailTo.Add(employee.Account.Email1);
            mailTo.Add(employee.Account.Email2);
            mailBody.MailTo = mailTo;

            mailBody.Subject = _CurrDate.Month + "月已经结束," +
                               BllUtility.GetResourceMessage(
                BllExceptionConst._Email_To_Employee_For_Confirming_Attendance);
            mailBody.Body = mailBody.Subject;

            GetAttendanceInfo(employee, mailBody);
            _IMailGateWay.Send(mailBody, true);
        }