public virtual ActionResult Delete(Guid agreementId)
        {
            // find agreement
            var agreement = _queryProcessor.Execute(
                new GetMyInstitutionalAgreementByGuidQuery(User, agreementId));

            if (agreement == null)
            {
                return(HttpNotFound());
            }

            // delete agreement
            var command = new PurgeInstitutionalAgreement(User, agreementId);

            _purgeHandler.Handle(command);

            SetFeedbackMessage("Institutional agreement was successfully deleted.");

            return(Json(true));
        }
        public virtual ActionResult Delete(Guid agreementId)
        {
            // find agreement
            var agreement = _queryProcessor.Execute(
                new GetMyInstitutionalAgreementByGuidQuery(User, agreementId));
            if (agreement == null) return HttpNotFound();

            // delete agreement
            var command = new PurgeInstitutionalAgreement(User, agreementId);
            _purgeHandler.Handle(command);

            SetFeedbackMessage("Institutional agreement was successfully deleted.");

            return Json(true);
        }