Beispiel #1
0
        public static string GetScripts(this HtmlMessageTypeEnum type, string title, string context, int timer)
        {
            var script = string.Empty;

            switch (type)
            {
            default:
            case HtmlMessageTypeEnum.Basic:
                script = "swal({\"" + title + "\"})";
                return(script);

            case HtmlMessageTypeEnum.Timer:
                script = "swal({title: \"" + title + "\",text: \"" + context + "\",timer : " + timer + " ,showConfirmButton :false })";
                return(script);
            }
        }
Beispiel #2
0
        protected virtual JavaScriptResult JavaScript(HtmlMessageTypeEnum type, string title, string content = "", int timer = 0)
        {
            var script = type.GetScripts(title, content, timer);

            return(JavaScript(script));
        }