Пример #1
0
        public ActionResult UsersWidget()
        {
            var model = new UsersWidgetModel
            {
                Users = userRepo.UserOptions
            };

            return(PartialView("Widgets/UsersWidget", model));
        }
Пример #2
0
        public ActionResult UsersWidget(UsersWidgetModel model, string commandbutton)
        {
            switch (commandbutton)
            {
            case "Delete":
                return(RedirectToAction("DeleteUser", "Admin", new { userId = model.SelectedItem }));

            case "Edit":
                return(RedirectToAction("EditUser", "Admin", new { userId = model.SelectedItem }));
            }
            return(RedirectToAction("Index", "Admin"));
        }