Ejemplo n.º 1
0
        public ActionResult CreatePosition(position position)
        {
            TechCareerFair.DAL.PositionDAL.PositionRepository pr = new DAL.PositionDAL.PositionRepository();
            pr.Insert(position);

            return(RedirectToAction("ListPositions", new { id = position.Business }));
        }
        public ActionResult CreatePosition(position position, string businessEmail)
        {
            if (businessEmail == User.Identity.GetUserName())
            {
                TechCareerFair.DAL.PositionDAL.PositionRepository pr = new DAL.PositionDAL.PositionRepository();
                pr.Insert(position);

                return(RedirectToAction("ListPositions", new { id = position.Business }));
            }
            else
            {
                return(RedirectToAction("AccessDenied", "Error"));
            }
        }