コード例 #1
0
        public IActionResult Notifier(string type)
        {
            switch (type)
            {
            case "success":
                _notifier.Success("This is a Success Notification");
                break;

            case "info":
                _notifier.Info("This is a Info Notification");
                break;

            case "warning":
                _notifier.Warning("This is a Warning Notification");
                break;

            case "error":
                _notifier.Error("This is a Error Notification");
                break;

            default:
                _notifier.Success("This is a Success Notification", 3);
                _notifier.Info("This is a Info Notification", 4);
                _notifier.Warning("This is a Warning Notification", 6);
                _notifier.Error("This is a Error Notification", 7);
                break;
            }

            return(RedirectToAction("Index"));
        }