public static string Show(string msg, string msgHeader, _messegeType type, _alartTopIndex ltop) { //------------Icon Set-------- string ico = IcoSet(type); string msgHtmlString = ""; //------------Generate Message String-------- string strmsgValue = Enum.GetName(typeof(_messegeType), type); switch (ltop) { #region ========tOP iNDEX============== case _alartTopIndex.Topindex: msgHtmlString = //=============Messege box=============- "<div id=\"msgdialog\" title=\"Basic dialog\"> " + " <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> " + "</div> " + " <script> " + " $( function() { " + " $( \"#dialog\" ).dialog(); " + " } ); " + " </script> "; break; #endregion #region --------sIMPLE----------- case _alartTopIndex.Simple: msgHtmlString = //=============Messege box=============- "<div class = \"alert alert-" + strmsgValue + " fade in w3-card-4\">" + "<a href =\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>" + "<strong>" + ico + " " + msgHeader + "</strong> " + msg + "." + "</div>"; //=============Messege box=============- break; #endregion } return(msgHtmlString = ""); }
private static string IcoSet(_messegeType type) { switch (type) { case _messegeType.danger: return("✗"); case _messegeType.info: return("😃"); case _messegeType.warning: return("⚠"); case _messegeType.success: return("✔"); } return(string.Empty); }