Example #1
0
 public UserSessionDataContract AddGuestInformation(UserSessionDataContract userInformation)
 {
     return ExecuteFaultHandledOperation(() =>
         {
             IUserDetailsBusinessEngine userDetailsBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IUserDetailsBusinessEngine>();
             IActivitiesBookingEngine activitiesBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IActivitiesBookingEngine>();
             GuestInformationMaster guestInformation = userDetailsBusinessEngine.AddGuestInformation(userInformation.Name, userInformation.GuestKey, userInformation.Email);
             activitiesBusinessEngine.UpdateActivityForUser(userInformation.SessionKey, userInformation.GuestKey);
             IUserApplicationActivityRepository userApplicationActivityRepository
                = _DataRepositoryFactory.GetDataRepository<IUserApplicationActivityRepository>();
             userApplicationActivityRepository.UpdateUserSession(userInformation.SessionKey, userInformation.IsUserLoggedIn, userInformation.LoginMethod);
             //for existing users
             if (guestInformation.DOB != default(DateTime))
             {
                 userInformation.DOB = guestInformation.DOB;
                 userInformation.Address = guestInformation.Address;
                 userInformation.City = guestInformation.City;
                 userInformation.Email = guestInformation.Email;
             }
             return userInformation;
         });
 }
Example #2
0
        public UserSessionDataContract LogUserSession()
        {
            return ExecuteFaultHandledOperation(() =>
            {
                IUserApplicationActivityRepository userApplicationActivityRepository
                        = _DataRepositoryFactory.GetDataRepository<IUserApplicationActivityRepository>();
                UserApplicationActivityDetails userActivityDetails = userApplicationActivityRepository.LogUserSession();
                UserSessionDataContract result = new UserSessionDataContract();
                result.SessionKey = userActivityDetails.SessionKey;
                result.IsUserLoggedIn = userActivityDetails.UserLoggedIn;
                result.LoginMethod = userActivityDetails.LoginMethod;

                return result;
            });
        }
Example #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);
     });
 }
Example #4
0
 public UserSessionDataContract GetGuestInformation(string guestKey)
 {
     return ExecuteFaultHandledOperation(() =>
     {
         IUserDetailsBusinessEngine userDetailsBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IUserDetailsBusinessEngine>();
         IActivitiesBookingEngine activitiesBusinessEngine = _BusinessEngineFactory.GetBusinessEngine<IActivitiesBookingEngine>();
         GuestInformationMaster guestInformation = userDetailsBusinessEngine.GetUserInformation(guestKey);
         UserSessionDataContract result = new UserSessionDataContract();
         result.GuestKey = guestInformation.GuestKey;
         result.Address = guestInformation.Address;
         result.City = guestInformation.City;
         result.DOB = guestInformation.DOB;
         result.Email = guestInformation.Email;
         result.Name = guestInformation.Name;
         result.PhoneNumber = guestInformation.PhoneNumber;
         result.Pin = guestInformation.Pin;
         result.State = guestInformation.State;
         return result;
     });
 }