public ActionResult EditPosition(position position) { TechCareerFair.DAL.PositionDAL.PositionRepository pr = new DAL.PositionDAL.PositionRepository(); pr.Update(position); return(RedirectToAction("ListPositions", new { id = position.Business })); }
public ActionResult EditPosition(position position, string businessEmail) { if (businessEmail == User.Identity.GetUserName()) { ViewBag.BusinessEmail = businessEmail; TechCareerFair.DAL.PositionDAL.PositionRepository pr = new DAL.PositionDAL.PositionRepository(); pr.Update(position); return(RedirectToAction("ListPositions", new { id = position.Business })); } else { return(RedirectToAction("AccessDenied", "Error")); } }