Esempio n. 1
0
        public void AddSubscription(DateTimeRange subscriptionDateTimeRange)
        {
            var subscription = new MemberSubscription();

            subscription.MemberId = this.Id;
            subscription.Dates    = subscriptionDateTimeRange;

            MemberSubscriptions.Add(subscription);

            CreateOrUpdateUpdateEvent("Subscription Added");
        }
Esempio n. 2
0
 public void ExtendCurrentSubscription(DateTime newEndDate)
 {
     for (int i = 0; i < MemberSubscriptions.Count; i++)
     {
         MemberSubscription s = MemberSubscriptions[i];
         if (s.Dates.Contains(DateTime.Today))
         {
             s.Dates = new DateTimeRange(s.Dates.StartDate, newEndDate);
             CreateOrUpdateUpdateEvent("Subscription Updated");
         }
     }
 }