//Конструктор public ComputerShop() { customers = new Dictionary <string, Customer>(); cards = new List <Card>(); curCustomer = null; cards.Add(new Card()); curDate = GeneralDate.Instance().Date; cheerfulDays = new SortedSet <int>(); setCheerfulDays(); customerKey = ""; }
/// Проверка наступления нового месяца public bool checkNewMonth() { DateTime lastDate = curDate; curDate = GeneralDate.Instance().Date; if (curDate > lastDate && curDate.Month != lastDate.Month) { setCheerfulDays(); return(true); } return(false); }
//True, если нужно заменить public override bool IsChanging(Shop.Customer owner) { return(GeneralDate.Instance().Date >= changeDate); }
DateTime changeDate; //Дата замены карты //Конструктор public QuantumCard() : base() { discount = DiscountConst.QuantumDiscount; name = "quantum discount card"; changeDate = GeneralDate.Instance().Date.AddDays(DiscountConst.QuantumDaysLimit); }