Beispiel #1
0
        public ActionResult CancelRegistration(int id, string cancelationCode)
        {
            var result = _guestService.CancelRegistration(id, cancelationCode);
            var alertModel = new AlertViewModel();
            if (result.Result)
            {
                alertModel.AlertClass = "alert-success";
                alertModel.AlertText =
                    @"<img src='/Content/images/Mail/tick_green.png' /><span style='padding-left:20px;'>Rejestracja została ANULOWANA pomyślnie!</span>";
            }
            else
            {
                alertModel.AlertClass = "alert-danger";
                alertModel.AlertText = $"<img src='/Content/images/Mail/cancel_red.png' /><span style='padding-left:20px;'>Wystąpił błąd podczas procesu rejestracji ({result.ValidationErrors.FirstOrDefault()}). Spróbuj ponownie lub skontaktuj się z administratorem strony</span>";

            }
            return Index(new List<AlertViewModel> { alertModel });
        }
Beispiel #2
0
        public ActionResult ConfirmRegistration(int id, string confirmationCode)
        {
            var result = _guestService.ConfirmRegistration(id, confirmationCode);
            var alertModel = new AlertViewModel();
            if (result.FirstResult)
            {
                alertModel.AlertClass = "alert-success";
                alertModel.AlertText =
                    $"<img src='/Content/images/Mail/tick_green.png' /><span style='padding-left:20px;'>Rejestracja przebiegła pomyślnie. Jesteś naszym {result.SecondResult} gościem. Dziękujemy!</span>";

            }
            else
            {
                alertModel.AlertClass = "alert-danger";
                alertModel.AlertText =
                    $"<img src='/Content/images/Mail/cancel_red.png' /><span style='padding-left:20px;'>Wystąpił błąd podczas procesu rejestracji ({result.ValidationErrors.FirstOrDefault()}). Spróbuj ponownie lub skontaktuj się z administratorem strony</span>";
            }
            return Index(new List<AlertViewModel> { alertModel });
        }