public ActionResult Details([Bind(Include = "SelectedId")]AccountRoleAddingModel model) { var account = accountLogic.Get(model.SelectedId); var returnedModel = new AccountListModel(account.Login) { Id = account.Id, Role = account.Role, }; return PartialView("_DetailsAccountPartial", returnedModel); }
public ActionResult ChangeRole() { var accounts = accountLogic.GetAll().Values .Where(e => e.Login != User.Identity.Name) .Select(e => new AccountListModel(e.Login) { Id = e.Id, Role = e.Role }); var model = new AccountRoleAddingModel() { Accounts = accounts }; return View("AdminPage", model); }