예제 #1
0
        public FlightFids ConvertFromFlightShedule(NVAOMAFLIGHTSCHEDULE from, FlightDirection direction = FlightDirection.Arrival)
        {
            var ret = new FlightFids();

            this.FillFromFlightShedule(from, ret, direction);
            return(ret);
        }
예제 #2
0
 public void FillFromFlightShedule(NVAOMAFLIGHTSCHEDULE from, FlightFids to, FlightDirection direction = FlightDirection.Arrival)
 {
     to.Direction = direction;
     to.ID        = direction == FlightDirection.Arrival ? from.RECID : (-from.RECID);
     to.TransDate = from.TRANSDATE;
     to.Company   = from.CUSTACCOUNT;
     to.Flight    = (direction == FlightDirection.Arrival) ? from.FLIGHTCODEARRIVAL : from.FLIGHTCODEDEPARTURE;
     to.Dest      = (direction == FlightDirection.Arrival) ? from.STARTPORT : from.ENDPORTDEP;
     to.Trans     = (direction == FlightDirection.Arrival) ? (from.STOPOVER1 + " " + from.STOPOVER2) : (from.STOPOVER1DEP + " " + from.STOPOVER2DEP);
     //....
 }
예제 #3
0
 public string Serialize(FlightFids item)
 {
     using (var sw = new StringWriter())
     {
         using (var xw = XmlWriter.Create(sw))
         {
             var s = new XmlSerializer(typeof(FlightFids));
             s.Serialize(xw, item);
         }
         return(sw.ToString());
     }
 }