示例#1
1
 public static string GetCharisma_Alert(Charisma_AlertType type, string title, string msg)
 {
     var tag = new HtmlTag("div").AddClass("alert").AddClass(type.ToText());
     tag.Add("button").AddClass("close").Attr("type", "button").Attr("data-dismiss", "alert").Text("×");
     tag.Add("h4").AddClass("alert-heading").Text(title);
     tag.Add("p").Text(msg);
     return tag.ToString();
 }
示例#2
0
 public static string GetCharisma_Alert(Charisma_AlertType type, string title, IList<ValidationFailure> content)
 {
     var tag = new HtmlTag("div").AddClass("alert").AddClass(type.ToText());
     tag.Add("button").AddClass("close").Attr("type", "button").Attr("data-dismiss", "alert").Text("×");
     tag.Add("h4").AddClass("alert-heading").Text(title);
     foreach (var item in content)
     {
         tag.Add("p").Text(item.ErrorMessage);
     }
     return tag.ToString();
 }