Beispiel #1
0
        public static bool Update(DefaultContext db, SettingsProfile settingsProfile, out UserProfile userProfile)
        {
            userProfile = null;

            UserProfile dbUserProfile = GetDetail(db, settingsProfile.UserId);
            if (dbUserProfile == null)
                return false;

            dbUserProfile.CopyFrom(settingsProfile);
            db.SaveChanges();

            userProfile = dbUserProfile;

            return true;
        }
Beispiel #2
0
        public void CopyFrom(SettingsProfile settingsProfile)
        {
            CopyFrom((UserProfileEditBase)settingsProfile);

            Address = settingsProfile.Address;
            PSC = settingsProfile.PSC;
            DIC = settingsProfile.DIC;
            ICO = settingsProfile.ICO;
            ReminderTime = settingsProfile.ReminderTime;
            IsEventsPrivate = settingsProfile.IsEventsPrivate;
            ClaAccessAmount = settingsProfile.ClaAccessAmount;
            ClaAccessCurrency = settingsProfile.ClaAccessCurrency;
            SetClaAccessYearlyAccess(settingsProfile.ClaAccessCurrency, settingsProfile.ClaAccessYearlyAccess);
            LCID = settingsProfile.LCIDDropDownList;
            AutomaticLogoutInterval = settingsProfile.AutomaticLogoutInterval;
        }