Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Authorize(Roles = "Admin")]
- public ActionResult Details(int? id)
- {
- if (id == null)
- {
- return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
- }
- SCPersonnel sCPersonnel = db.SCPersonnels.Find(id);
- ViewBag.CreatedBy = db.AspNetUsers.Where(x => x.Id == sCPersonnel.CreatedBy).Select(x => x.UserName).FirstOrDefault();
- ViewBag.ModifiedBy = db.AspNetUsers.Where(x => x.Id == sCPersonnel.ModifiedBy).Select(x => x.UserName).FirstOrDefault();
- if (sCPersonnel == null)
- {
- return HttpNotFound();
- }
- return View(sCPersonnel);
- }
Add Comment
Please, Sign In to add comment