Пример #1
0
 public BookingStopValidator(BookingStop endpoint)
 {
     _stop = endpoint;
 }
Пример #2
0
        public void SetDataFrom(BookingStop stop)
        {
            Clear();
            StopType = stop.StopType;
            if (stop.EndpointType == BookingEndpointType.Suburb)
            {
                EndpointType = BookingEndpointType.Suburb;
                LandmarkName = stop.LandmarkName;
                BuildingName = stop.BuildingName;
                Address1 = stop.Address1;
                Address2 = stop.Address2;
                SuburbId = stop.SuburbId;
            }
            else if (stop.EndpointType == BookingEndpointType.AirportPrivate)
            {
                EndpointType = BookingEndpointType.AirportPrivate;
                AirportId = stop.AirportId;
                Charter = stop.Charter;
                ArrivalOrDepartureTime = stop.ArrivalOrDepartureTime;
                OriginOrDestination = stop.OriginOrDestination;
            }
            else if (stop.EndpointType == BookingEndpointType.AirportOther)
            {
                EndpointType = BookingEndpointType.AirportOther;
                AirportId = stop.AirportId;
                AirlineId = stop.AirlineId;
                FlightNumber = stop.FlightNumber;
                ArrivalOrDepartureTime = stop.ArrivalOrDepartureTime;
                OriginOrDestination = stop.OriginOrDestination;
            }

            Info = stop.Info;
        }