Пример #1
0
        public ActionResult Action(Guid id)
        {
            ConfirmationData data = ConfirmationService.GetData(id);

            if (data.IsUsed)
            {
                return(Redirect(data.ReturnUrl));
            }

            string returnUrl = Request.UrlReferrer.PathAndQuery;

            ConfirmationService.SetReturnUrl(id, returnUrl);

            ConfirmationActionViewModel model = new ConfirmationActionViewModel
            {
                Id      = id,
                Message = data.Message,
                NoUrl   = returnUrl,
                YesUrl  = data.ActionUrl
            };

            return(View(model));
        }