mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
nullreference MY ASS
This commit is contained in:
parent
6623a72766
commit
6d3cbbc1cd
1 changed files with 3 additions and 1 deletions
|
@ -40,6 +40,8 @@ public ActionResult AddUserToRole(string id)
|
||||||
Text = converted.Name,
|
Text = converted.Name,
|
||||||
Value = converted.Name
|
Value = converted.Name
|
||||||
});
|
});
|
||||||
|
if (converted.Id == id)
|
||||||
|
model.RoleId = converted.Name;
|
||||||
}
|
}
|
||||||
model.Users = new List<SelectListItem>();
|
model.Users = new List<SelectListItem>();
|
||||||
foreach(var u in db.Users.OrderBy(x => x.DisplayName).ToArray())
|
foreach(var u in db.Users.OrderBy(x => x.DisplayName).ToArray())
|
||||||
|
@ -50,7 +52,7 @@ public ActionResult AddUserToRole(string id)
|
||||||
Value = u.Id
|
Value = u.Id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
model.RoleId = id;
|
model.Username = db.Users.First().Id;
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue