示例#1
0
        public ActionResult SendRequest(int id)
        {
            var model = PostRepo.ApplyPost(id, HttpUtil.UserProfile.ID);

            if (model.HasError)
            {
                ViewBag.Error = model.Message;
            }
            else
            {
                ViewBag.Success = "You have applied for this post";
            }

            return(RedirectToAction("PostHomeTeacher"));
        }