Exemple #1
0
        internal TravelCard AsTravelCard()
        {
            if (_cSharpTravelCard == null)
            {
                _cSharpTravelCard = ReadStructData();
            }

            return(_cSharpTravelCard);
        }
Exemple #2
0
 public TravelCardViewModel(TravelCard backingCard)
 {
     _backingCard    = backingCard;
     SeasonPasses[0] = new SeasonPassViewModel(_backingCard.PeriodPass.ProductCode1,
                                               _backingCard.PeriodPass.PeriodStartDate1,
                                               _backingCard.PeriodPass.PeriodEndDate1,
                                               _backingCard.PeriodPass.ValidityArea1);
     SeasonPasses[1] = new SeasonPassViewModel(_backingCard.PeriodPass.ProductCode2,
                                               _backingCard.PeriodPass.PeriodStartDate2,
                                               _backingCard.PeriodPass.PeriodEndDate2,
                                               _backingCard.PeriodPass.ValidityArea2);
     SeasonPasses = SeasonPasses.OrderByDescending(x => x.EndDate).ToArray();
 }