private static void CacheUser(CoatsUserProfile theUser) { if (theUser == null) { throw new Exception("User to cache not valid"); } HttpContext.Current.Session["UserObject"] = theUser; }
private void MapUserProfileForUpdate(UserProfile model, CoatsUserProfile userProfile) { this.Logger.DebugFormat("MapUserProfileForUpdate", new object[0]); try { userProfile.NAME = model.CustomerDetails.FirstName; userProfile.SURNAME = model.CustomerDetails.LastName; userProfile.TELEPHONE = model.CustomerDetails.TelephoneNumber; userProfile.ABOUT = model.CustomerDetails.About; userProfile.LONG = model.CustomerDetails.Long; userProfile.LAT = model.CustomerDetails.Lat; userProfile.Keywords = model.Keywords; userProfile.POSTCODE = model.AddressDetails.Postcode; userProfile.PASSWORD = model.CustomerDetails.Password; } catch (Exception exception) { this.Logger.DebugFormat("MapUserProfileForUpdate ex {0}", new object[] { exception.Message }); } }
private UserProfile MapUserProfile(CoatsUserProfile ctsUserProfile, string userEmail) { return new UserProfile { CustomerDetails = { FirstName = ctsUserProfile.NAME, LastName = ctsUserProfile.SURNAME, TelephoneNumber = ctsUserProfile.TELEPHONE, EmailAddress = userEmail, Password = ctsUserProfile.PASSWORD, VerifyPassword = ctsUserProfile.PASSWORD, DisplayName = ctsUserProfile.DISPLAYNAME, About = ctsUserProfile.ABOUT, Long = ctsUserProfile.LONG, Lat = ctsUserProfile.LAT }, AddressDetails = { BuildingNameNumber = ctsUserProfile.BUILDING, City = ctsUserProfile.CITY, Postcode = ctsUserProfile.POSTCODE, Street = ctsUserProfile.STREET }, Keywords = ctsUserProfile.Keywords }; }
private static void MapUserProfile(UserProfile model, CoatsUserProfile userProfile) { userProfile.POSTCODE = model.AddressDetails.Postcode; userProfile.MAIL = model.CustomerDetails.EmailAddress; userProfile.NAME = model.CustomerDetails.FirstName; userProfile.SURNAME = model.CustomerDetails.LastName; userProfile.TELEPHONE = model.CustomerDetails.TelephoneNumber; userProfile.PASSWORD = model.CustomerDetails.Password; userProfile.ADDRESSBOOKID = int.Parse(ConfigurationManager.AppSettings["AddressBookId"]); userProfile.DISPLAYNAME = model.CustomerDetails.DisplayName; userProfile.ABOUT = model.CustomerDetails.About; userProfile.LONG = model.CustomerDetails.Long; userProfile.LAT = model.CustomerDetails.Lat; userProfile.Keywords = model.Keywords; }