public TrainSeatPrice(TrainTicketPrice TrainTicketPrice, SeatTypeConfig SeatType, decimal Price, bool IsDefault) : base()
 {
     this.TrainTicketPrice = TrainTicketPrice;
     this.SeatType         = SeatType;
     this.Price            = Price;
     this.IsDefault        = IsDefault;
     this.TrainTicketPrice.AddTrainSeatPrice(this);
 }
Beispiel #2
0
 public void RemoveTrainTicketPrice(TrainTicketPrice TrainTicketPrice)
 {
     if (TrainTicketPrices.Where(o => o.StartTrainStation == TrainTicketPrice.StartTrainStation && o.EndTrainStation == TrainTicketPrice.EndTrainStation).Count() == 0)
     {
         throw new Exception("not exsit  TrainTicketPrice");
     }
     TrainTicketPrices.Remove(TrainTicketPrice);
 }
Beispiel #3
0
 public void AddTrainTicketPrice(TrainTicketPrice TrainTicketPrice)
 {
     if (TrainTicketPrices.Where(o => o.StartTrainStation == TrainTicketPrice.StartTrainStation && o.EndTrainStation == TrainTicketPrice.EndTrainStation).Count() > 0)
     {
         throw new Exception("exsit same TrainTicketPrice");
     }
     TrainTicketPrices.Add(TrainTicketPrice);
 }
 public TrainSeatPrice(TrainTicketPrice TrainTicketPrice, SeatTypeConfig SeatType, decimal Price) : this(TrainTicketPrice, SeatType, Price, false)
 {
 }