public GuestInformationMaster AddGuestInformation(string userName, string userKey, string email)
 {
     IGuestInformationMasterRepository guestInformationRepository = _DataRepositoryFactory.GetDataRepository<IGuestInformationMasterRepository>();
     GuestInformationMaster result = guestInformationRepository.Get(userKey);
     if (result == null)
     {
         result = new GuestInformationMaster() { GuestKey = userKey, Name = userName, DOB = DateTime.Now };
         guestInformationRepository.Add(result);
     }
     return result;
 }
 public bool UpdateGuestInformation(GuestInformationMaster guestInformation, string sessionKey)
 {
     IGuestInformationMasterRepository guestInformationRepository = _DataRepositoryFactory.GetDataRepository<IGuestInformationMasterRepository>();
     guestInformationRepository.Update(guestInformation);
     return true;
 }
Ejemplo n.º 3
0
 public bool UpdateGuestInformation(UserSessionDataContract userInformation)
 {
     return ExecuteFaultHandledOperation(() =>
     {
         IUserDetailsBusinessEngine userDetailsBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IUserDetailsBusinessEngine>();
         IActivitiesBookingEngine activitiesBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IActivitiesBookingEngine>();
         activitiesBusinessEngine.UpdateActivityForUser(userInformation.SessionKey, userInformation.GuestKey);
         GuestInformationMaster guestInformation = new GuestInformationMaster();
         guestInformation.GuestKey = userInformation.GuestKey;
         guestInformation.Address = userInformation.Address;
         guestInformation.City = userInformation.City;
         guestInformation.DOB = userInformation.DOB;
         guestInformation.Email = userInformation.Email;
         guestInformation.Name = userInformation.Name;
         guestInformation.PhoneNumber = userInformation.PhoneNumber;
         guestInformation.Pin = userInformation.Pin;
         guestInformation.State = userInformation.State;
         return userDetailsBusinessEngine.UpdateGuestInformation(guestInformation, userInformation.SessionKey);
     });
 }