public SweetAlert Type(SweetAlertType type)
 {
     if (type != SweetAlertType.Default)
     {
         Attributes["type"] = string.Format("'{0}'", type.ToString().ToLower());
     }
     SetScript();
     return(this);
 }
 public static extern void Show(string title, string mesage, SweetAlertType type);
Beispiel #3
0
 public static SweetAlertBs SweetAlertBs(string message, string title = "پیغام", SweetAlertType type = SweetAlertType.Default)
 {
     return(new SweetAlertBs().Text(message).Title(title).Type(type));
 }
 public static SweetAlert SweetAlert(this HtmlHelper helper, string message, string title = "پیغام", SweetAlertType type = SweetAlertType.Default)
 {
     return(new SweetAlert(helper).Text(message).Title(title).Type(type));
 }
Beispiel #5
0
 /// <summary>
 /// Display a message
 /// </summary>
 /// <param name="title">The modal header title</param>
 /// <param name="message">The message to be displayed</param>
 /// <param name="messageType">Define the icon to be used</param>
 /// <returns>Operation result</returns>
 public async ValueTask DoDisplayMessage(string title, string message, SweetAlertType messageType)
 {
     await js.InvokeVoidAsync("Swal.fire", title, message, messageType.ToString());
 }
Beispiel #6
0
 public static extern void Show(string title, string mesage, SweetAlertType type);
Beispiel #7
0
        public void SweetAlert(string message, SweetAlertType notificationType)
        {
            var msg = "swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "')" + "";

            TempData["notification"] = msg;
        }