Ejemplo n.º 1
0
        public CommitResponse UpdateAccountSettings(int memberID, AccountSettings settings)
        {
            CommitResponse response = new CommitResponse();
            Member memberInfo = GetMemberInfoByID(memberID);
            memberInfo.Email = settings.Email;

            LeetRaidsDB.SubmitChanges();

            return response;
        }
Ejemplo n.º 2
0
        public ViewResult Settings(AccountSettings model)
        {
            //Valid Email
            if(!String.IsNullOrEmpty(model.Email) && !Validate.Email(model.Email))
            {
                ValidationErrors.Add("BadEmail", "Invalid Email");
            }

            if (ValidationErrors.Count == 0)
            {
                accountInterface.UpdateAccountSettings(MemberInfo.MemberID, model);
                ViewData.Add("Success", "<p>Account information successfully changed</p>");
            }
            else
            {
                RegisterErrorsWithModel();
            }

            return View(model);
        }
Ejemplo n.º 3
0
        public AccountSettings GetAccountSettings(int memberID)
        {
            AccountSettings settings = new AccountSettings();

            Member mem = GetMemberInfoByID(memberID);
            settings.Email = mem.Email;

            return settings;
        }