예제 #1
0
        public ActionResult Deny(Guid id)
        {
            var userService = new UserInfoService();
            var thesis      = Db.Internships.SingleOrDefault(x => x.Id == id);

            var model = new InternshipDetailModel()
            {
                Internship = thesis,
                Student    = thesis.Student,
                User       = userService.GetUser(thesis.Student.UserId)
            };

            ViewBag.UserRight = GetUserRight();

            return(View(model));
        }
예제 #2
0
        public ActionResult Approve(InternshipDetailModel model)
        {
            var member = GetMyMembership();
            var user   = GetCurrentUser();

            var thesis = Db.Internships.SingleOrDefault(x => x.Id == model.Internship.Id);

            thesis.ResponseDate     = DateTime.Now;
            thesis.IsPassed         = true;
            thesis.RequestAuthority = member;

            Db.SaveChanges();

            /*
             * var tm = InitMailModel(thesis, user);
             *
             * new MailController().ThesisConditionCheckResponseEMail(tm).Deliver();
             */


            return(RedirectToAction("Announced"));
        }