Esempio n. 1
0
 public NotyMessage AddNotyMessage(NotyMessage message)
 {
     NotyMessages.Add(message);
     return(message);
 }
Esempio n. 2
0
 public NotyMessage AddNotyMessage(NotyMessage message)
 {
     NotyMessages.Add(message);
     return message;
 }
Esempio n. 3
0
 public static void NotySuccess(this ControllerBase controller, string message, bool isSticky = false)
 {
     var notyMessage = new NotyMessage
     {
         Type = AlertType.Success,
         IsSticky = isSticky,
         Message = message,
         CloseWith = MessageCloseType.Click,
         Location = MessageLocation.TopLeft,
         CloseAnimation = AnimationTypes.BounceOut,
         OpenAnimation = AnimationTypes.Bounce,
         IsModal = true
     };
     controller.AddNotyAlert(notyMessage);
 }
Esempio n. 4
0
 public static void NotyAlert(this ControllerBase controller,string message, bool isSticky = false)
 {
     var notyMessage = new NotyMessage
     {
         Type = AlertType.Alert,
         IsSticky = isSticky,
         Message = message
     };
     controller.AddNotyAlert(notyMessage);
 }
Esempio n. 5
0
        private static void AddNotyAlert(this ControllerBase controller, NotyMessage message)
        {
            var noty = controller.TempData.ContainsKey(Noty.Noty.TempDataKey)
                 ? (Noty.Noty)controller.TempData[Noty.Noty.TempDataKey]
                 : new Noty.Noty();

            noty.AddNotyMessage(message);

            controller.TempData[Noty.Noty.TempDataKey] = noty;
        }