コード例 #1
0
 protected override void OnEmployeeLayOff(EmployeeLayOffEventArgs e)
 {
     if (e.Cause == LayOffCause.target)
     {
         base.OnEmployeeLayOff(e);
     }
 }
コード例 #2
0
 ///CallBackMethod
 public void RemoveStaff(object sender, EmployeeLayOffEventArgs e)
 {
     if (sender is Employee em)
     {
         if (e.Cause == LayOffCause.above60 || e.Cause == LayOffCause.noStock || e.Cause == LayOffCause.resign || e.Cause == LayOffCause.target)
         {
             Staff.Remove(em);
             em.EmployeeLayOff -= RemoveStaff;
         }
     }
 }
コード例 #3
0
ファイル: Club.cs プロジェクト: ITI-9-Month-Progrm/CSharp
 ///CallBackMethod
 public void RemoveMember(object sender, EmployeeLayOffEventArgs e)
 {
     if (sender is Employee em)
     {
         if (e.Cause == LayOffCause.noStock || e.Cause == LayOffCause.target)
         {
             Members.Remove(em);
             em.EmployeeLayOff -= RemoveMember;
         }
     }
 }
コード例 #4
0
ファイル: Employee.cs プロジェクト: ITI-9-Month-Progrm/CSharp
 protected virtual void OnEmployeeLayOff(EmployeeLayOffEventArgs e)
 {
     EmployeeLayOff?.Invoke(this, e);
 }