예제 #1
0
 /// <summary>
 /// Populate Subscriber data
 /// </summary>
 /// <param name="dr">
 /// rowset for query
 /// </param>
 /// <param name="colnbr">
 /// dictionary mapping column labels to numbers
 /// </param>
 public TripsBySubscriberRow(TripsByWeekdayRow weekday, DataRow dr, Dictionary <string, int> colnbr)
 {
     Weekday    = weekday;
     Subscriber = new SubscriberDimension(dr, colnbr);
     Bikes      = new BikesMeasure(dr, colnbr);
     TripHours  = new TripsByHourList();
 }
예제 #2
0
        internal void UpdateForDR(TripsByWeekdayRow weekday, DataRow dr, Dictionary <string, int> colnbr)
        {
            TripsBySubscriberRow subs = new TripsBySubscriberRow(weekday, dr, colnbr);
            TripsBySubscriberRow selsubs;

            if (Exists(x => x.Subscriber.MemberUniqueName == subs.Subscriber.MemberUniqueName))
            {
                selsubs = Find(x => x.Subscriber.MemberUniqueName == subs.Subscriber.MemberUniqueName);
                selsubs.Bikes.IncValue(subs.Bikes.GetValue());
            }
            else
            {
                Add(subs);
                selsubs = subs;
            }
            selsubs.TripHours.UpdateForDR(subs, dr, colnbr);
        }