예제 #1
0
 /// <summary>
 /// delete contracs, verify if:
 /// 1)the employer is descartable, if he is very valuable, we prefer save the contract
 /// 2)if the contract is still in force
 /// </summary>
 /// <param name="oldContract"></param>
 public void DelContract(Contract oldContract)
 {
     if (oldContract.hasBeenSigned && oldContract.endWork < DateTime.Now)
     {
         throw new Exception("Cannot delete a signed and active contract.");
     }
     dal.DelContract(oldContract);
 }