public ActionResult CreateMany() { ViewBag.StartPort = (db.Credentials.Max(x => x.WebsitePort) + 1).ToString(); CreateManyViewModel vm = new CreateManyViewModel(); Credentials cred = new Credentials(); vm.Credentials = cred; SelectList list = new SelectList(db.Teams.ToList(), "TeamId", "Name"); ViewBag.Teams = list; PrincipalSearchResult<Principal> groups = interaction.GetUserGroups(); ViewBag.UserGroup = new SelectList(groups.ToList(), "Name", "Name"); return View(vm); }
public ActionResult CreateMany(CreateManyViewModel vm) { interaction.CreateMany(vm.UserNamePrefix,vm.UserNameSuffix, vm.Team.TeamId,vm.Credentials.DatabasePassword,vm.Credentials.WebsitePort,vm.Credentials.WindowsUserGroupName, vm.StudentNames, vm.Credentials.DisablePasswordChange,vm.Credentials.PasswordNeverExpires); return RedirectToAction("Index"); }