protected string RenderTagSelector(bool isCompany) { var sb = new StringBuilder(); var manager = new MailTemplateManager(DaoFactory); var tags = manager.GetTags(isCompany); var current = tags[0].Category; sb.AppendFormat("<optgroup label='{0}'>", current); foreach (var tag in tags) { if (tag.Category != current) { current = tag.Category; sb.Append("</optgroup>"); sb.AppendFormat("<optgroup label='{0}'>", current); } sb.AppendFormat("<option value='{0}'>{1}</option>", tag.Name, tag.DisplayName); } sb.Append("</optgroup>"); return(sb.ToString()); }
public String TestTemplate() { var temp = new MailTemplateManager(); return(temp.Apply(@" asdfasdf asdfasdfasdf asdfasdf asdf $(Person.First Name) asd f asdf as dfas ", 2328)); // throw new NotImplementedException(); // return temp. }
public string GetMessagePreview(string template, int contactId) { var manager = new MailTemplateManager(); return(manager.Apply(template, contactId)); }