コード例 #1
0
        public async Task <ActionResult> EditProfile(EditUser_View model)
        {
            MyUser actUser = ActUser;

            actUser.Email    = model.Email;
            actUser.UserName = model.UserName;
            if (await Auth.EditUser(actUser))
            {
                ViewBag.Completed = true;
            }
            else
            {
                ViewBag.Completed = false;
            }
            return(View(ActUser));
        }
コード例 #2
0
        public async Task <ActionResult> EditUser(EditUser_View model)
        {
            MyUser actUser = Auth.GetUserById(model.Id);

            actUser.UserName = model.UserName;
            actUser.Email    = model.Email;
            if (await Auth.EditUser(actUser))
            {
                ViewBag.Completed = true;
            }
            else
            {
                ViewBag.Completed = false;
            }
            return(RedirectToAction("GetUser"));
        }