public InvoiceTaxDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                                   EmployeeWraperHelper employeeWraperHelper,
                                   CrmSecurity crmSecurity)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _crmSecurity          = crmSecurity;
 }
Exemplo n.º 2
0
 public FileEntryWrapperHelper(
     ApiDateTimeHelper apiDateTimeHelper,
     EmployeeWraperHelper employeeWraperHelper
     )
 {
     ApiDateTimeHelper    = apiDateTimeHelper;
     EmployeeWraperHelper = employeeWraperHelper;
 }
Exemplo n.º 3
0
 public VoipCallDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                                 EmployeeWraperHelper employeeWraperHelper,
                                 DaoFactory daoFactory)
 {
     _daoFactory           = daoFactory;
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
 }
Exemplo n.º 4
0
 public CasesDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                              EmployeeWraperHelper employeeWraperHelper,
                              CrmSecurity crmSecurity,
                              DaoFactory daoFactory)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _CRMSecurity          = crmSecurity;
     _daoFactory           = daoFactory;
 }
Exemplo n.º 5
0
 public FileEntryWrapperHelper(
     ApiDateTimeHelper apiDateTimeHelper,
     EmployeeWraperHelper employeeWraperHelper,
     FileSharingHelper fileSharingHelper, FileSecurity fileSecurity
     )
 {
     ApiDateTimeHelper    = apiDateTimeHelper;
     EmployeeWraperHelper = employeeWraperHelper;
     FileSharingHelper    = fileSharingHelper;
     FileSecurity         = fileSecurity;
 }
Exemplo n.º 6
0
 public TaskDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                             EmployeeWraperHelper employeeWraperHelper,
                             CrmSecurity crmSecurity,
                             DaoFactory daoFactory,
                             EntityDtoHelper entityDtoHelper)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _crmSecurity          = crmSecurity;
     _daoFactory           = daoFactory;
     _entityDtoHelper      = entityDtoHelper;
 }
Exemplo n.º 7
0
 /// <summary>
 /// </summary>
 /// <param name="context"></param>
 /// <param name="fileStorageService"></param>
 public FilesControllerHelper(
     ApiContext context,
     FileStorageService <T> fileStorageService,
     FileWrapperHelper fileWrapperHelper,
     FilesSettingsHelper filesSettingsHelper,
     FilesLinkUtility filesLinkUtility,
     FileUploader fileUploader,
     DocumentServiceHelper documentServiceHelper,
     TenantManager tenantManager,
     SecurityContext securityContext,
     FolderWrapperHelper folderWrapperHelper,
     FileOperationWraperHelper fileOperationWraperHelper,
     FileShareWrapperHelper fileShareWrapperHelper,
     FileShareParamsHelper fileShareParamsHelper,
     EntryManager entryManager,
     FolderContentWrapperHelper folderContentWrapperHelper,
     ChunkedUploadSessionHelper chunkedUploadSessionHelper,
     DocumentServiceTrackerHelper documentServiceTracker,
     IOptionsMonitor <ILog> optionMonitor,
     SettingsManager settingsManager,
     EncryptionKeyPairHelper encryptionKeyPairHelper,
     IHttpContextAccessor httpContextAccessor,
     FileConverter fileConverter,
     ApiDateTimeHelper apiDateTimeHelper,
     UserManager userManager,
     DisplayUserSettingsHelper displayUserSettingsHelper)
 {
     ApiContext                 = context;
     FileStorageService         = fileStorageService;
     FileWrapperHelper          = fileWrapperHelper;
     FilesSettingsHelper        = filesSettingsHelper;
     FilesLinkUtility           = filesLinkUtility;
     FileUploader               = fileUploader;
     DocumentServiceHelper      = documentServiceHelper;
     TenantManager              = tenantManager;
     SecurityContext            = securityContext;
     FolderWrapperHelper        = folderWrapperHelper;
     FileOperationWraperHelper  = fileOperationWraperHelper;
     FileShareWrapperHelper     = fileShareWrapperHelper;
     FileShareParamsHelper      = fileShareParamsHelper;
     EntryManager               = entryManager;
     FolderContentWrapperHelper = folderContentWrapperHelper;
     ChunkedUploadSessionHelper = chunkedUploadSessionHelper;
     DocumentServiceTracker     = documentServiceTracker;
     SettingsManager            = settingsManager;
     EncryptionKeyPairHelper    = encryptionKeyPairHelper;
     ApiDateTimeHelper          = apiDateTimeHelper;
     UserManager                = userManager;
     DisplayUserSettingsHelper  = displayUserSettingsHelper;
     HttpContextAccessor        = httpContextAccessor;
     FileConverter              = fileConverter;
     Logger = optionMonitor.Get("ASC.Files");
 }
Exemplo n.º 8
0
 public OpportunityDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                                    EmployeeWraperHelper employeeWraperHelper,
                                    CrmSecurity crmSecurity,
                                    DaoFactory daoFactory,
                                    CurrencyProvider currencyProvider)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _crmSecurity          = crmSecurity;
     _daoFactory           = daoFactory;
     _currencyProvider     = currencyProvider;
 }
Exemplo n.º 9
0
 public FolderWrapperHelper(
     ApiDateTimeHelper apiDateTimeHelper,
     EmployeeWraperHelper employeeWrapperHelper,
     AuthContext authContext,
     IDaoFactory daoFactory,
     FileSecurity fileSecurity,
     GlobalFolderHelper globalFolderHelper)
     : base(apiDateTimeHelper, employeeWrapperHelper)
 {
     AuthContext        = authContext;
     DaoFactory         = daoFactory;
     FileSecurity       = fileSecurity;
     GlobalFolderHelper = globalFolderHelper;
 }
 public InvoiceItemDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                                    EmployeeWraperHelper employeeWraperHelper,
                                    CrmSecurity crmSecurity,
                                    SettingsManager settingsManager,
                                    CurrencyProvider currencyProvider,
                                    DaoFactory daoFactory)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _crmSecurity          = crmSecurity;
     _settingsManager      = settingsManager;
     _currencyProvider     = currencyProvider;
     _daoFactory           = daoFactory;
 }
Exemplo n.º 11
0
 public EmployeeWraperFullHelper(
     ApiContext context,
     UserManager userManager,
     UserPhotoManager userPhotoManager,
     WebItemSecurity webItemSecurity,
     CommonLinkUtility commonLinkUtility,
     DisplayUserSettingsHelper displayUserSettingsHelper,
     ApiDateTimeHelper apiDateTimeHelper)
     : base(context, displayUserSettingsHelper, userPhotoManager, commonLinkUtility, userManager)
 {
     Context           = context;
     WebItemSecurity   = webItemSecurity;
     ApiDateTimeHelper = apiDateTimeHelper;
 }
Exemplo n.º 12
0
 public ContactDtoTypeConverter(ApiDateTimeHelper apiDateTimeHelper,
                                EmployeeWraperHelper employeeWraperHelper,
                                CrmSecurity crmSecurity,
                                CurrencyProvider currencyProvider,
                                PathProvider pathProvider,
                                DaoFactory daoFactory)
 {
     _apiDateTimeHelper = apiDateTimeHelper;
     _employeeDtoHelper = employeeWraperHelper;
     _crmSecurity       = crmSecurity;
     _currencyProvider  = currencyProvider;
     _pathProvider      = pathProvider;
     _daoFactory        = daoFactory;
 }
Exemplo n.º 13
0
 public EditHistoryWrapper(EditHistory editHistory, ApiDateTimeHelper apiDateTimeHelper, UserManager userManager, DisplayUserSettingsHelper displayUserSettingsHelper)
 {
     ID             = editHistory.ID;
     Key            = editHistory.Key;
     Version        = editHistory.Version;
     VersionGroup   = editHistory.VersionGroup;
     Changes        = editHistory.Changes.Select(r => new EditHistoryChangesWrapper(r, apiDateTimeHelper)).ToList();
     ChangesHistory = editHistory.ChangesString;
     Created        = apiDateTimeHelper.Get(editHistory.ModifiedOn);
     User           = new EditHistoryAuthor(userManager, displayUserSettingsHelper)
     {
         Id = editHistory.ModifiedBy
     };
     ServerVersion = editHistory.ServerVersion;
 }
 public RelationshipEventDtoTypeConverter(
     ApiDateTimeHelper apiDateTimeHelper,
     EmployeeWraperHelper employeeWraperHelper,
     FileWrapperHelper fileWrapperHelper,
     CrmSecurity crmSecurity,
     DaoFactory daoFactory,
     EntityDtoHelper entityDtoHelper)
 {
     _apiDateTimeHelper    = apiDateTimeHelper;
     _employeeWraperHelper = employeeWraperHelper;
     _crmSecurity          = crmSecurity;
     _daoFactory           = daoFactory;
     _fileWrapperHelper    = fileWrapperHelper;
     _entityDtoHelper      = entityDtoHelper;
 }
Exemplo n.º 15
0
 protected internal T Get <T, TId>(FileEntry <TId> entry) where T : FileEntryWrapper <TId>, new()
 {
     return(new T
     {
         Id = entry.ID,
         Title = entry.Title,
         Access = entry.Access,
         Shared = entry.Shared,
         Created = ApiDateTimeHelper.Get(entry.CreateOn),
         CreatedBy = EmployeeWraperHelper.Get(entry.CreateBy),
         Updated = ApiDateTimeHelper.Get(entry.ModifiedOn),
         UpdatedBy = EmployeeWraperHelper.Get(entry.ModifiedBy),
         RootFolderType = entry.RootFolderType,
         ProviderItem = entry.ProviderEntry.NullIfDefault(),
         ProviderKey = entry.ProviderKey,
         ProviderId = entry.ProviderId.NullIfDefault()
     });
 }
Exemplo n.º 16
0
 public FileWrapperHelper(
     ApiDateTimeHelper apiDateTimeHelper,
     EmployeeWraperHelper employeeWrapperHelper,
     AuthContext authContext,
     IDaoFactory daoFactory,
     FileSecurity fileSecurity,
     GlobalFolderHelper globalFolderHelper,
     CommonLinkUtility commonLinkUtility,
     FilesLinkUtility filesLinkUtility,
     FileUtility fileUtility)
     : base(apiDateTimeHelper, employeeWrapperHelper)
 {
     AuthContext        = authContext;
     DaoFactory         = daoFactory;
     FileSecurity       = fileSecurity;
     GlobalFolderHelper = globalFolderHelper;
     CommonLinkUtility  = commonLinkUtility;
     FilesLinkUtility   = filesLinkUtility;
     FileUtility        = fileUtility;
 }
Exemplo n.º 17
0
 public EditHistoryChangesWrapper(EditHistoryChanges historyChanges, ApiDateTimeHelper apiDateTimeHelper)
 {
     User    = historyChanges.Author;
     Created = apiDateTimeHelper.Get(historyChanges.Date);
 }
Exemplo n.º 18
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entry"></param>
 protected FileEntryWrapper(FileEntry entry, EmployeeWraperHelper employeeWraperHelper, ApiDateTimeHelper apiDateTimeHelper)
 {
     Title          = entry.Title;
     Access         = entry.Access;
     Shared         = entry.Shared;
     Created        = apiDateTimeHelper.Get(entry.CreateOn);
     CreatedBy      = employeeWraperHelper.Get(entry.CreateBy);
     Updated        = apiDateTimeHelper.Get(entry.ModifiedOn);
     UpdatedBy      = employeeWraperHelper.Get(entry.ModifiedBy);
     RootFolderType = entry.RootFolderType;
     ProviderItem   = entry.ProviderEntry.NullIfDefault();
     ProviderKey    = entry.ProviderKey;
     ProviderId     = entry.ProviderId.NullIfDefault();
 }
Exemplo n.º 19
0
		public DateTime CalculateDropoffDateTime (DateTime dropDateTime)
		{

			DateTime pickupTime = new ApiDateTimeHelper () {
				Date = this.PickupDate,
				Hour = this.PickupHour,
				Minutes = this.PickupMinutes,
				AmPm = this.PickupAmPm,

			}.Merge ();

			// if dropoff time is early then pickuptime, then we have spanned to the next day.  Add 1 day to dropoff
			if (dropDateTime < pickupTime)
				dropDateTime = dropDateTime.AddDays (1);

			return dropDateTime;
		}
Exemplo n.º 20
0
		public BookingEntry ConvertToAtlas ()
		{
			ApiDateTimeHelper dtHelper;
			UseDropOffAirport = this.DropLocation.IsAirport || this.DropLocation.IsTrain;
			UsePickupAirport = this.PickupLocation.IsAirport || this.PickupLocation.IsTrain;

			// Customer Number will be inferred from authenticated user
			//getInfo.CustomerNumber = "";

			dtHelper = new ApiDateTimeHelper (this.TripDateTime.GetValueOrDefault ());

			PickupDate = dtHelper.Date; // i.e. "08/31/2013" (use leading zeros)
			PickupHour = dtHelper.Hour; // i.e. "05" (use leading zeros)
			PickupMinutes = dtHelper.Minutes; // i.e. "00" (use leading zeros)
			PickupAmPm = dtHelper.AmPm; // i.e. "PM"
			RecomendPickupTime = false;

			//getInfo.HasAdditionalPassengers = false;

			//required if Outbound
			if (DropLocation.Airport != null) {
				dtHelper = new ApiDateTimeHelper (this.DepartureDateTime.GetValueOrDefault ());
				DropOffFlightHour = dtHelper.Hour;
				DropOffFlightMinutes = dtHelper.Minutes;
				DropOffFlightAmPm = dtHelper.AmPm;
				DropOffFlightDate = dtHelper.Date;
				DropOffAirline = TripAirline.Code;
				DropOffAirport = DropLocation.Airport.AirportCode;
                
			}

			// required if Inbound
			if (PickupLocation.Airport != null) {

				PickupAirport = PickupLocation.Airport.AirportCode;
				if (TripAirline != null) {
					PickupAirline = TripAirline.Code;
				} else {
					PickupAirline = "";
				}

			} else {
				PickupAirline = "";
				PickupFlightOriginCity = "";
			}

			// 2/18/14 JMO, updated to store pickupLocationDescription from name
			{
				//Required if Pickup is Address
				if (PickupLocation.Address != null) {
					PickupAddress = PickupLocation.Address.StreetAddress + " " + PickupLocation.Address.StreetAddress2; //  "USE O FOR OFFICE P/U'S";
					PickupCity = PickupLocation.Address.City;
					PickupState = PickupLocation.Address.State;
					PickupZipCode = PickupLocation.Address.Zip;
					PickupLocationDescription = PickupLocation.Address.Name;

					// Specify true below if Address specified should be saved to Profile 
					//getInfo.SavePickupLocationToAddressBook = false;
				}

				if (DropLocation.Address != null) {
					//Required if Drop is Address
					DropOffAddress = DropLocation.Address.StreetAddress + " " + DropLocation.Address.StreetAddress2;
					DropOffCity = DropLocation.Address.City;
					DropOffState = DropLocation.Address.State;
					DropOffZipCode = DropLocation.Address.Zip;
					DropoffLocationDescription = DropLocation.Address.Name;

				}
			}

			#region Additional Stop
			TripDetailAdditionalStop additionalStop;
			// Clear all properties needed by API (Atlas) as insurance in case user removed additional stops
			//	AdditionalStopFlag = false;
			AdditionalStopPassengerName1 = "";
			AdditionalStopAddress1 = "";
			AdditionalStopCity1 = "";
			AdditionalStopState1 = "";
			AdditionalStopZip1 = "";

			AdditionalStopPassengerName2 = "";
			AdditionalStopAddress2 = "";
			AdditionalStopCity2 = "";
			AdditionalStopState2 = "";
			AdditionalStopZip2 = "";

			AdditionalStopPassengerName3 = "";
			AdditionalStopAddress3 = "";
			AdditionalStopCity3 = "";
			AdditionalStopState3 = "";
			AdditionalStopZip3 = "";

			if (AdditionalStopFlag) {
				additionalStop = AdditionalStops [0];

				if (additionalStop != null) {


					AdditionalStopPassengerName1 = additionalStop.PassengerName;
					AdditionalStopAddress1 = additionalStop.Address.StreetAddress + " " + additionalStop.Address.StreetAddress2;
					AdditionalStopCity1 = additionalStop.Address.City;
					AdditionalStopState1 = additionalStop.Address.State;
					AdditionalStopZip1 = additionalStop.Address.Zip;

					if (AdditionalStops.Count > 1) {

						additionalStop = AdditionalStops [1];

						if (additionalStop != null) {

							AdditionalStopPassengerName2 = additionalStop.PassengerName;
							AdditionalStopAddress2 = additionalStop.Address.StreetAddress + " " + additionalStop.Address.StreetAddress2;
							AdditionalStopCity2 = additionalStop.Address.City;
							AdditionalStopState2 = additionalStop.Address.State;
							AdditionalStopZip2 = additionalStop.Address.Zip;

							if (AdditionalStops.Count > 2) {
								additionalStop = AdditionalStops [2];

								if (additionalStop != null) {
									AdditionalStopPassengerName3 = additionalStop.PassengerName;
									AdditionalStopAddress3 = additionalStop.Address.StreetAddress + " " + additionalStop.Address.StreetAddress2;
									AdditionalStopCity3 = additionalStop.Address.City;
									AdditionalStopState3 = additionalStop.Address.State;
									AdditionalStopZip3 = additionalStop.Address.Zip;

								}
							}

						}
					}

				}
			}

			#endregion Additional Stop

			#region "Special Billing Requirements"
			if (SpecialBillingRequirements != null) {
				foreach (SpecialBillingRequirement sbr in SpecialBillingRequirements) {
					if (!sbr.Value.IsEmpty ()) {
						string tripPropertyName = "specialbillingvalue" + sbr.DisplayIndex.ToString ();

						// use reflection to add data to actual property
						Type corpReqType = this.GetType ();
						var properties = corpReqType.GetProperties (); //.Where(p => p.DeclaringType == typeof(BookingEntry));
						PropertyInfo propertyInfo = properties.Where (pr => pr.Name.ToLower ().Equals (tripPropertyName)).FirstOrDefault ();
						if (propertyInfo != null && propertyInfo.CanWrite) {
							propertyInfo.SetValue (this, sbr.Value);
						}
					}
				}
			}
			#endregion "Special Billing Requirements"
			// No Trip Number for New Trips
			if (this.IsNew)
				TripNumber = "";
			// CorpCode Only getInfouired for Corporate Customers
			//getInfo.CorporationNumber = "";

			if (this.HourlyTripFlag && EstimatedNumberOfHours != null) {

				DateTime dropOffTime = TripDateTime.Value.AddHours (EstimatedNumberOfHours.GetValueOrDefault ());
				dtHelper = new ApiDateTimeHelper (dropOffTime);
				DropOffHour = dtHelper.Hour;
				DropOffMinutes = dtHelper.Minutes;
				DropOffAmPm = dtHelper.AmPm;
			}
			//getInfo.SpecialInstructions = "";


			//Based on Customer Profile settings
			//getInfo.AutoReceiptFlag = false;
			//getInfo.AutoReceiptAddToProfile = false;

			//Payment specified on Billing Step
			this.PaidByCreditCard = this.IsPayingByCreditCard;
			this.PaidByProfileCreditCard = false;
			if (this.PaidByCreditCard) {
				if (this.CreditCard.CardToUse != null) {
					this.PaidByProfileCreditCard = true;
					this.ProfileCreditCardKey = this.CreditCard.CardToUse.CreditCardID;
				}
				this.PaidByDirectBill = false;
			} else {
				this.PaidByDirectBill = true;
			}
			this.PaidByAdminDirectBill = false;

			//getInfo.PromotionID = 0;

			// After the credit card number is entered, we will be determining the type of card automatically.
			var ccType = CreditCardUtilities.GetCreditCardCodeByNumber (CreditCardNumber);
			if (!String.IsNullOrWhiteSpace (ccType))
				CreditCardType = ccType;


			return this;
		}
Exemplo n.º 21
0
		/// <summary>
		/// Merges from API. Sets up data used for trip details that doesn't exist in API.
		/// </summary>
		/// <returns>The from API.</returns>
		/// <param name="api">API.</param>
		/// <param name="mobile">Mobile.</param>
		public void MergeFromApi ()
		{
			this.TripDateTime = DateTime.Parse (String.Format ("{0} {1}:{2} {3}", this.PickupDate, this.PickupHour, this.PickupMinutes, this.PickupAmPm));

			Vehicle preferredVehicle = CachesClient.GetVehicle (this.CarType, this.PreferredCarName);
			if (preferredVehicle != null) {
				Rate selectedRate = new Rate () {
					CarType = this.CarType,
					PreferedVehicleName = this.PreferredCarName,
					VehicleName = preferredVehicle.Name,
					LuggageCapacity = preferredVehicle.LuggageCapacity,
					MaxPassengerDescription = preferredVehicle.PassengerCapacity,
					ImagePath = preferredVehicle.RateQuoteImageNameFullPath

				};
				this.SelectedRate = selectedRate;

			}

			this.IsCarSeatNeeded = this.BoosterSeats + this.ToddlerSeats + this.InfantSeats > 0;
			this.IsPickupSignRequested = !this.PickupSign.IsEmpty ();
			this.IsChauffeurCommentsRequested = !this.AdditionalComments1.IsEmpty ();

			this.IsPayingByCreditCard = this.PaidByCreditCard;
			if (!this.ProfileCreditCardKey.IsEmpty ()) {
				if (this.CreditCard.CardToUse == null)
					this.CreditCard.CardToUse = new ProfileCreditCard ();

				this.CreditCard.CardToUse.CreditCardID = this.ProfileCreditCardKey;
			}


			if (this.HourlyTripFlag) {
				DateTime estimatedDropTime = CalculateDropoffDateTime (
					                             new ApiDateTimeHelper () {
						Date = this.PickupDate,  // Note: Atlas does not store a date for drop off time; use the pickup date for our calculations
						Hour = this.DropOffHour,
						Minutes = this.DropOffMinutes,
						AmPm = this.DropOffAmPm,

					}.Merge ()
				                             );

				DateTime pickupTime = new ApiDateTimeHelper () {
					Date = this.PickupDate,
					Hour = this.PickupHour,
					Minutes = this.PickupMinutes,
					AmPm = this.PickupAmPm,

				}.Merge ();



				//Timespan span = estimatedDropTime.Subtract (pickupTime);
				TimeSpan span = estimatedDropTime - pickupTime;
				this.EstimatedNumberOfHours = span.TotalHours;
			}
			if (this.UseDropOffAirport) {
				this.DropLocation = new TripLocation () {
					Airport = CacheContext.Current.Airports.FirstOrDefault (x => x.AirportCode == this.DropOffAirport),
					LocationItemType = GetAirportLocationType (this.DropOffAirport)
				};

				this.TripAirline = CachesClient.GetAirline (DropOffAirline, this.FBO);
				this.DepartureDateTime = CalculateDropoffDateTime (
					new ApiDateTimeHelper () {
						Date = this.PickupDate,  // Note: Atlas does not store a date for drop off time; use the pickup date for our calculations
						Hour = this.DropOffFlightHour,
						Minutes = this.DropOffFlightMinutes,
						AmPm = this.DropOffFlightAmPm,

					}.Merge ()
				);

			} else {
				this.DropLocation = new TripLocation () {
					Address = new LocationInfo () {

						StreetAddress = this.DropOffAddress,
						City = this.DropOffCity,
						State = this.DropOffState,
						Zip = this.DropOffZipCode
					}
				};
			}

			if (this.UsePickupAirport) {
				this.PickupLocation = new TripLocation () {
					Airport = CacheContext.Current.Airports.FirstOrDefault (x => x.AirportCode == this.PickupAirport),
					LocationItemType = GetAirportLocationType (this.DropOffAirport)
				};
				this.TripAirline = CachesClient.GetAirline (PickupAirline, this.FBO);


			} else {
				this.PickupLocation = new TripLocation () {
					Address = new LocationInfo () {

						StreetAddress = this.PickupAddress,
						City = this.PickupCity,
						State = this.PickupState,
						Zip = this.PickupZipCode
					}
				};
			}

			if (AdditionalStops.Count > 0)
				AdditionalStops.RemoveRange (0, AdditionalStops.Count - 1);  // in case user went back, clear the previous listk

			this.AdditionalStops.Add (new TripDetailAdditionalStop () {
				DisplayIndex = 1,
				PassengerName = this.AdditionalStopPassengerName1,
				Address = new LocationInfo () {
					StreetAddress = this.AdditionalStopAddress1,
					City = this.AdditionalStopCity1,
					State = this.AdditionalStopState1,
					Zip = this.AdditionalStopZip1
				}

			});

			this.AdditionalStops.Add (new TripDetailAdditionalStop () {
				DisplayIndex = 2,
				PassengerName = this.AdditionalStopPassengerName2,
				Address = new LocationInfo () {
					StreetAddress = this.AdditionalStopAddress2,
					City = this.AdditionalStopCity2,
					State = this.AdditionalStopState2,
					Zip = this.AdditionalStopZip2
				}

			});

			this.AdditionalStops.Add (new TripDetailAdditionalStop () {
				DisplayIndex = 3,
				PassengerName = this.AdditionalStopPassengerName3,
				Address = new LocationInfo () {
					StreetAddress = this.AdditionalStopAddress3,
					City = this.AdditionalStopCity3,
					State = this.AdditionalStopState3,
					Zip = this.AdditionalStopZip3
				}

			});

			foreach (TripDetailAdditionalStop tdap in this.AdditionalStops) {
				if (!tdap.PassengerName.IsEmpty ()) {
					this.HasAdditionalPassengers = true;
					break;
				}
			}
			#region "Special Billing Requirements"
			foreach (SpecialBillingRequirement sbr in UserContext.Current.SpecialBillingRequirements) {

				string tripPropertyName = "specialbillingvalue" + sbr.DisplayIndex.ToString ();

				// use reflection to add data to actual property
				Type corpReqType = this.GetType ();
				var properties = corpReqType.GetProperties (); //.Where(p => p.DeclaringType == typeof(BookingEntry));
				PropertyInfo propertyInfo = properties.Where (pr => pr.Name.ToLower ().Equals (tripPropertyName)).FirstOrDefault ();
				if (propertyInfo != null && propertyInfo.CanRead) {
					this.SpecialBillingRequirements.Add (new SpecialBillingRequirement () {
						DisplayIndex = sbr.DisplayIndex,
						Prompt = sbr.Prompt,
						MinSize = sbr.MinSize,
						MaxSize = sbr.MaxSize,
						Value = (string)propertyInfo.GetValue (this, null)
					}
					);

				}

			}
			#endregion "Special Billing Requirements"

		}