private static BookingProcess GetBooking(dbBuchungen booking) { BookingProcess bookingprocess = new BookingProcess(); bookingprocess.Id = booking.buchGuid != null?booking.buchGuid.Trim() : ""; //bookingprocess.Status = model.Status; bookingprocess.OfferInfo.Country = "Kroatien"; bookingprocess.OfferInfo.PlaceName = booking.buchCampOrt != null?booking.buchCampOrt.Trim() : ""; bookingprocess.OfferInfo.SiteName = booking.buchCampName != null?booking.buchCampName.Trim() : ""; bookingprocess.OfferInfo.CheckIn = booking.buchAnreise; bookingprocess.OfferInfo.CheckOut = booking.buchAbreise; bookingprocess.TravelApplicant.FirstName = booking.buchVornahme != null?booking.buchVornahme.Trim() : ""; bookingprocess.TravelApplicant.LastName = booking.buchNachname != null?booking.buchNachname.Trim() : ""; bookingprocess.TravelApplicant.Contry = booking.buchLand != null?booking.buchLand.Trim() : ""; bookingprocess.TravelApplicant.Adress = booking.buchStrasse != null?booking.buchStrasse.Trim() : ""; //bookingprocess.TravelApplicantId = model.TravelApplicantId; bookingprocess.AccProvider = booking.buchPartnerID; bookingprocess.Season = booking.buchAnreise.Year.ToString(); //bookingprocess.OfferInfo.OfferName = model.OfferName; bookingprocess.TravelApplicant.MobilePhone = booking.buchHandyNr != null?booking.buchHandyNr.Trim() : ""; bookingprocess.TravelApplicant.Phone = booking.buchTelefonNr != null?booking.buchTelefonNr.Trim() : ""; //bookingprocess.TravelApplicant.ZipCode = model.ZipCode; bookingprocess.TravelApplicant.Place = booking.buchPlzOrt != null?booking.buchPlzOrt.Trim() : ""; //bookingprocess.PaymentsForProvider = model.PaymentsForProvider; //bookingprocess.Payments = model.Payments; bookingprocess.BookingNumber = booking.BookingNumber; bookingprocess.Status = DocumentProcessStatus.Close; bookingprocess.TravelApplicant.EMail = booking.buchEmail != null?booking.buchEmail.Trim() : ""; bookingprocess.TravelApplicant.Salutation = booking.buchAnrede != null?booking.buchAnrede.Trim() : ""; bookingprocess.OfferInfo.Adults = booking.buchErwaksene; bookingprocess.OfferInfo.Children = booking.buchKinder; CreateBookingItems(bookingprocess, booking.buchBuchungsDatum); return(bookingprocess); }
private static Customer CreateCustomer(dbBuchungen bookinginfo) { Customer customer = new Customer(); customer.Adress = bookinginfo.buchStrasse != null?bookinginfo.buchStrasse.Trim() : ""; customer.Contry = bookinginfo.buchLand != null?bookinginfo.buchLand.Trim() : ""; customer.EMail = bookinginfo.buchEmail != null?bookinginfo.buchEmail.Trim() : ""; customer.FirstName = bookinginfo.buchVornahme != null?bookinginfo.buchVornahme.Trim() : ""; customer.LastName = bookinginfo.buchNachname != null?bookinginfo.buchNachname.Trim() : ""; customer.Salutation = bookinginfo.buchAnrede != null?bookinginfo.buchAnrede.Trim() : ""; customer.Phone = bookinginfo.buchTelefonNr != null?bookinginfo.buchTelefonNr.Trim() : ""; customer.MobilePhone = bookinginfo.buchHandyNr != null?bookinginfo.buchHandyNr.Trim() : ""; customer.Place = bookinginfo.buchPlzOrt != null?bookinginfo.buchPlzOrt.Trim() : ""; return(customer); }