Esempio n. 1
0
        public static Customer Map(IBookingCreated cons)
        {
            var cust = new Customer
            {
                SupplementName   = cons.CustomerName,
                Type             = "N/A",
                RegistrationDate = cons.Arrival,
                Email            = cons.Email,
                Address          = "N/A",
                Bookings         = new List <Booking>(),
                Id = cons.Customerid
            };

            var booking = new Booking
            {
                Arrival  = cons.Arrival,
                Depature = cons.Depature,
                ItemName = cons.ItemName,
                ItemNo   = cons.ItemNo,
                Price    = cons.Currency + ": " + cons.Price.ToString()
            };

            cust.Bookings.Add(booking);

            return(cust);
        }
Esempio n. 2
0
 public static Booking MapFromExisting(IBookingCreated cons)
 {
     return(new Booking
     {
         Arrival = cons.Arrival,
         Depature = cons.Depature,
         ItemName = cons.ItemName,
         ItemNo = cons.ItemNo,
         Price = cons.Currency + ": " + cons.Price.ToString()
     });
 }