public bool CancelAmendment(string id)
        {
            var amendment = GetAmendment(id);

            _cache.Remove(string.Format(GetAmendmentKeyFormat, CheckingWindow, amendment.Urn));
            return(_amendmentService.CancelAmendment(id));
        }
コード例 #2
0
        public IActionResult Cancel(string id)
        {
            if (_amendmentService.CancelAmendment(id))
            {
                return(RedirectToAction("Index"));
            }

            return(RedirectToAction("Error", "Home"));
        }
コード例 #3
0
        public IActionResult Delete([FromRoute][SwaggerParameter("The id of the amendment to cancel", Required = true)]
                                    string id, [FromRoute]
                                    [SwaggerParameter("The checking window to request amendments from", Required = false)]
                                    CheckingWindow checkingWindow)
        {
            var result   = _amendmentService.CancelAmendment(id);
            var response = new GetResponse <bool>
            {
                Result = result,
                Error  = new Error()
            };

            return(Ok(response));
        }