Пример #1
0
        public ActionResult Edit(User user)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View());
                }

                using (UsersLogic logic = new UsersLogic())
                {
                    logic.EditUser(user);
                }
                return(RedirectToAction("Index", "MangeHome"));
            }
            catch (Exception)
            {
                ViewBag.Error = "We have problem on the server, Please try again later!";
                return(View(new User()));
            }
        }
Пример #2
0
 public void EditUser([FromBody] User user)
 {
     _usersLogic.EditUser(user);
 }