Example #1
0
        public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType, IList <Seat> Seats) : base()
        {
            this.Name         = Name;
            this.Order        = Order;
            this.CarriageType = CarriageType;
            this.Seats        = Seats ?? new List <Seat>();
            this.Train        = Train;

            Train?.AddTrainCarriage(this);
        }
Example #2
0
        public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType, IList <Seat> Seats)
        {
            this.Id           = Guid.NewGuid();
            this.Name         = Name;
            this.Order        = Order;
            this.CarriageType = CarriageType;
            this.Seats        = Seats ?? new List <Seat>();
            this.Train        = Train;

            AddTime      = DateTimeOffset.Now;
            UpdateTime   = DateTimeOffset.Now;
            AddUserId    = UserHelper.User.Id;
            UpdateUserId = UserHelper.User.Id;

            Train.AddTrainCarriage(this);
        }
Example #3
0
 public TrainCarriage(Train Train, int Order, string Name, CarriageTypeConfig CarriageType) : this(Train, Order, Name, CarriageType, null)
 {
 }
Example #4
0
 public TrainCarriage(int Order, string Name, CarriageTypeConfig CarriageType) : this(null, Order, Name, CarriageType)
 {
 }