コード例 #1
0
 public ViewResult Index(CandidateSearchVm model, string output)
 {
     CurrentPage = PageTypes.Find;
     model.ApplyFilters(Request.Form);
     if (output == "mail")
     {
         var html = new HtmlComposer();
         foreach (var item in model.Filters.Skip(3).Take(2))
         {
             html.AppendRaw("<table border='1' style='text-align:left' cellpadding:'2'>");
             html.AppendRaw("<tr>");
             html.AppendRaw("<th  style='width:100px;'>" + item.Name + "</th><th style='width:100px;'>Count</th>");
             html.AppendRaw("</tr>");
             foreach (var fItem in item.FilterItems)
             {
                 html.AppendRaw("<tr>");
                 html.AppendDiv("<td>" + fItem.ValueText + "</td><td>" + fItem.Count + "</td>");
                 html.AppendRaw("</tr>");
             }
             html.AppendRaw("</table>");
             html.AppendBr();
         }
         ViewBag.Stat = html.Text;
         return(View("Mail"));
     }
     return(View(model));
 }
コード例 #2
0
        public string ReminderMail()
        {
            var date     = string.Format("Due Date : {0}", DueDate.ToString("ddd, dd MMM yyyy"));
            var composer = new HtmlComposer();

            composer.AppendDiv("This is gentle reminder for the task assigned to you.")
            .AppendHead("Task : " + Title)
            .AppendDiv(date)
            .AppendDiv("Click the below link for more details")
            .AppendLink(Routes.ActivityUrl(ActivityId), Routes.ActivityUrl(ActivityId));
            return(composer.Text.ToString());
        }