Slack.Automation/Promact.Erp.Util/Email Templates/TaskMail.tt
<#@ template language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ parameter name ="Descriptions" type="System.Collections.Generic.List<Promact.Erp.DomainModel.Models.TaskMailDetails>" #>
<!DOCTYPE>
<html>
<head>
<style>
table {
border-collapse: collapse;
width: 100%;
}
table, td, th {
border: 1px solid black;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #9FA3A5}
</style>
</head>
<body>
Daily Task Mail <#= DateTime.UtcNow.Date.ToShortDateString() #>
<table>
<tr>
<td>
<b>Sl. No.</b>
</td>
<td>
<b>Description</b>
</td>
<td>
<b>Hours</b>
</td>
<td>
<b>Comment</b>
</td>
<td>
<b>Status</b>
</td>
</tr>
<#
int i = 0;
foreach (var item in Descriptions)
{
i++;
#>
<tr>
<td>
<#= i #>
</td>
<td>
<#= item.Description #>
</td>
<td>
<#= item.Hours #>
</td>
<td>
<#= item.Comment #>
</td>
<td>
<#= item.Status #>
</td>
</tr>
<#
}
#>
</table>
</body>