Badges.Areas.Admin.Controllers.BadgeSubmissionController.Deny C# (CSharp) Метод

Deny() публичный Метод

public Deny ( System.Guid id, string reason ) : System.Web.Mvc.ActionResult
id System.Guid
reason string
Результат System.Web.Mvc.ActionResult
        public ActionResult Deny(Guid id, string reason)
        {
            var badgeSubmission = RepositoryFactory.BadgeSubmissionRepository.GetNullableById(id);

            if (badgeSubmission == null) return HttpNotFound();

            badgeSubmission.Submitted = false;

            _notificationService.Notify(badgeSubmission.Creator, AuthenticatedUser,
                "Your badge request has been denied",
                "Sorry, your request for the \"" + badgeSubmission.Badge.Name + "\" badge has been denied for the following reason: " + reason,
                null);
            RepositoryFactory.BadgeSubmissionRepository.EnsurePersistent(badgeSubmission);

            Message = "The badge request has been denied and a notification has been sent to the student.";
            return RedirectToAction("Index");
        }