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; }
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); }