中心调研拒绝邮件模板

Uat_Study
hang 2022-05-23 16:33:11 +08:00
parent f0f99ce647
commit 6e45be1f56
3 changed files with 85 additions and 47 deletions

View File

@ -109,6 +109,9 @@
<Content Update="NLog.config"> <Content Update="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin.html"> <Content Update="wwwroot\EmailTemplate\TrialUserExistJoin.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>

View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 18px'>
尊敬的 {0} ,您好:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
您好, 您填写的中心调研表被驳回,详细信息如下:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
<div>
项目编号: {1}
</div>
<div>
试验方案号: {2}
</div>
<div>
试验名称: {3}
</div>
<div>
中心编号: {4}
</div>
<div>
中心名称: {5}
</div>
<div>
驳回原因: {6}
</div>
</div>
<a href='{7}' style='margin-left:60px;font-size:14px;padding: 10px;text-decoration: none;display:{8} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;'>
登陆并查看
</a>
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -567,44 +567,30 @@ namespace IRaCIS.Core.Application.Contracts
//主题 //主题
messageToSend.Subject = $"[来自展影IRC] [{trialInfo.ResearchProgramNo}] 关于中心调研审批的提醒"; messageToSend.Subject = $"[来自展影IRC] [{trialInfo.ResearchProgramNo}] 关于中心调研审批的提醒";
builder.HtmlBody = @$"<body style='font-family: 微软雅黑;padding: 0;margin: 0;'> var pathToFile = _hostEnvironment.WebRootPath
<div style='padding-left: 40px;background: #f6f6f6'> + Path.DirectorySeparatorChar.ToString()
<div style='padding-top: 20px;'> + "EmailTemplate"
<div style='line-height: 40px;font-size: 18px'> + Path.DirectorySeparatorChar.ToString()
{ (user == null ? survey.UserName : user.LastName + "/ " + user.FirstName)}: + "TrialSiteSurveyReject.html";
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
,
</div>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 80%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
<div>
: {trialInfo.TrialCode}
</div>
<div>
: {trialInfo.ResearchProgramNo}
</div>
<div>
: {trialInfo.ExperimentName}
</div>
<div>
: {siteInfo.TrialSiteCode}
</div>
<div>
: {siteInfo.TrialSiteAliasName}
</div>
<div>
: {survey.LatestBackReason}
</div>
<div>
<a href='{ trialSiteSubmitBackCommand.RouteUrl}' style='margin-left:60px;font-size:14px;padding: 10px;text-decoration: none;display:{(survey.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none")} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;'> using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
</a> var templateInfo = SourceReader.ReadToEnd();
</div>
</div>
</div> builder.HtmlBody = string.Format(templateInfo,
</div> (user == null ? survey.UserName : user.LastName + "/ " + user.FirstName),
</body>"; trialInfo.TrialCode,
trialInfo.ResearchProgramNo,
trialInfo.ExperimentName,
siteInfo.TrialSiteCode,
siteInfo.TrialSiteAliasName,
survey.LatestBackReason,
trialSiteSubmitBackCommand.RouteUrl,
(survey.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none")
);
}
messageToSend.Body = builder.ToMessageBody(); messageToSend.Body = builder.ToMessageBody();