Beispiel #1
0
        public void Alert(string message, Enum.NotificationType notificationType)
        {
            var msg = "<script language='javascript'> swal('" + notificationType.ToString().ToUpper() + "', '" +
                      message + "','" + notificationType + "', { timer: 5000,closeModal: true,buttons: [true, 'OK!'], className: 'red-bg',})" + "</script>";

            TempData["notification"] = msg;
        }
Beispiel #2
0
        /// <summary>
        /// Sets the information for the system notification.
        /// </summary>
        /// <param name="message">The message to display to the user.</param>
        /// <param name="notifyType">The type of notification to display to the user: Success, Error or Warning.</param>
        public void Message(string message, Enum.NotificationType notifyType)
        {
            TempData["Notification2"] = message;

            switch (notifyType)
            {
            case Enum.NotificationType.success:
                TempData["NotificationCSS"] = "alert-box success";
                break;

            case Enum.NotificationType.error:
                TempData["NotificationCSS"] = "alert-box errors";
                break;

            case Enum.NotificationType.warning:
                TempData["NotificationCSS"] = "alert-box warning";
                break;

            case Enum.NotificationType.info:
                TempData["NotificationCSS"] = "alert-box notice";
                break;
            }
        }
        public void Alert(string message, Enum.NotificationType notificationType)
        {
            var msg = "swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "')" + "";

            TempData["notification"] = msg;
        }
Beispiel #4
0
        public void Notify(string message, Enum.NotificationType notificationType)
        {
            var msg = "<script language='javascript'>swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "' ,{buttons: false,timer: 2000,})" + "</script>";

            TempData["notification"] = msg;
        }
Beispiel #5
0
        // GET: Base
        //public void Alert(string message, Enum.NotificationType notificationType)
        //{
        //    var msg = "swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "')" + "";
        //    TempData["notification"] = msg;
        //}
        public void Alert(string message, Enum.NotificationType notificationType)
        {
            var msg = "<script language='javascript'>swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "')" + "</script>";

            TempData["notification"] = msg;
        }