public bool CanLeaveJob(CompanyEmployee employee)
        {
            if (employee.GetJobType() == JobTypeEnum.Contracted)
            {
                var contract = employee.JobContract;

                return(contract.AbusedByCompany);
            }
            return(true);
        }
Beispiel #2
0
 /// <summary>
 /// It does nothing to non-contract jobs
 /// </summary>
 /// <param name="employee"></param>
 public void AddCompanyAbusement(CompanyEmployee employee)
 {
     if (employee.GetJobType() == JobTypeEnum.Contracted)
     {
         if (employee.JobContract.AbusedByCompany == false)
         {
             using (NoSaveChanges)
             {
                 InformatAboutCompanyAbusement(employee.Company, employee);
             }
         }
         employee.JobContract.AbusedByCompany = true;
         ConditionalSaveChanges(companyEmployeeRepository);
     }
 }