コード例 #1
0
 public Contract(ISubscriber subscriber, TariffType type, DateTime dateOfConclusion)
 {
     Subscriber            = subscriber;
     DateOfConclusion      = dateOfConclusion;
     Number                = Rnd.Next(100, 999);
     Tariff                = new TariffPlane(type);
     _lastTariffUpdateDate = DateTime.Now.Date;
 }
コード例 #2
0
 public bool ChangeTariff(TariffType tariffType, DateTime lastDate)
 {
     if (DateTime.Now.AddMonths(-1).Date < lastDate)
     {
         return(false);
     }
     _lastTariffUpdateDate = DateTime.Now.Date;
     Tariff = new TariffPlane(tariffType);
     return(true);
 }