|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/54f3ceba/6be944cd/ |
?#pragma checksum "D:\wwwroot\klbttc\wwwroot\supplier.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A7F396409C392CC19CF390695957F3DD5AFF4AF8"
#line 1 "D:\wwwroot\klbttc\wwwroot\supplier.aspx.cs"
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class supplier : System.Web.UI.Page
{
public string layer = string.Empty;
string attfileurl, file = string.Empty;
private NewEmailInfo email = new NewEmailInfo();
protected void Page_Load(object sender, EventArgs e)
{
var reqParam = Request.QueryString;
foreach (var item in reqParam.AllKeys)
{
if (item == "action" && Request.QueryString["action"].ToString() == "Insert")
{
// ²éÎÊÑéÖ¤ÂëÊÇ·ñÕýÈ·
if (Session["checkcodeUser"] == null)
{
layer = "<script>layer.confirm('òž×C´aŸoЧ£¬Õˆ³ÁÐÂÝ”È룡', { btn:['´_¶¨']}, function() { window.history.back()});</script>";
}
else
{
if (!Request.Form["yzCode"].ToString().ToLower().Equals(Session["checkcodeUser"].ToString()))
{
layer = "<script>layer.confirm('òž×C´aŸoЧ£¬Õˆ³ÁÐÂÝ”È룡', { btn:['´_¶¨']}, function() {window.history.back() });</script>";
}
else
{
SendMsg();
}
}
}
}
}
private void SendMsg()
{
// »ñÈ¡±íµ¥ÐÅÏ¢
if (Request.Form.Count > 0)
{
// »ù´¡ÐÅÏ¢
email.CompanyOrPerson = SqlKey.ReplaceUrlBadChar(Request.Form["userType"]);
email.UserNo = SqlKey.ReplaceUrlBadChar(Request.Form["userNo"]);
email.CoName = SqlKey.ReplaceUrlBadChar(Request.Form["coName"]);
email.FirstName = SqlKey.ReplaceUrlBadChar(Request.Form["firstName"]);
email.LastName = SqlKey.ReplaceUrlBadChar(Request.Form["lastName"]);
email.UserTelPhone = SqlKey.ReplaceUrlBadChar(Request.Form["userTelPhone"]);
email.UserEmaul = SqlKey.ReplaceUrlBadChar(Request.Form["userEmaul"]);
email.userGetDate = SqlKey.ReplaceUrlBadChar(Request.Form["userGetDate"]);
// »ã±¨ÕßÐÅÏ¢
email.BgFirstName = SqlKey.ReplaceUrlBadChar(Request.Form["bgFirstName"]);
email.BgLastName = SqlKey.ReplaceUrlBadChar(Request.Form["bgLastName"]);
email.BgJobType_Ccareer = SqlKey.ReplaceUrlBadChar(Request.Form["career"]);
email.BgJobTypeName = SqlKey.ReplaceUrlBadChar(Request.Form["bgJobType"]);
email.BgOtherJob = SqlKey.ReplaceUrlBadChar(Request.Form["bgotherJob"]);
email.FollowUp = SqlKey.ReplaceUrlBadChar(Request.Form["follow-up"]);
email.BgUserCompany = SqlKey.ReplaceUrlBadChar(Request.Form["bguserCoName"]);
email.BgTelPhone = SqlKey.ReplaceUrlBadChar(Request.Form["bguserTelPhone"]);
email.BgEmail = SqlKey.ReplaceUrlBadChar(Request.Form["bguserAddress"]);
// »¼ÕßÐÅÏ¢
email.HzXing = SqlKey.ReplaceUrlBadChar(Request.Form["hzXing"]);
email.HzMing = SqlKey.ReplaceUrlBadChar(Request.Form["hzMing"]);
email.HzSex = SqlKey.ReplaceUrlBadChar(Request.Form["hzSex"]);
email.HzAge = SqlKey.ReplaceUrlBadChar(Request.Form["hzAge"]);
email.HzYear = SqlKey.ReplaceUrlBadChar(Request.Form["hzYear"]); // ÄêÔÂÈÕ
//email.HzMonth = SqlKey.ReplaceUrlBadChar(Request.Form["hzMonth"]);
//email.HzDay = SqlKey.ReplaceUrlBadChar(Request.Form["hzDay"]);
email.HzMinZu = SqlKey.ReplaceUrlBadChar(Request.Form["mingzu"]); // »¼ÕßÃñ×å
email.HzKg = SqlKey.ReplaceUrlBadChar(Request.Form["hzKg"]);
email.HzCm = SqlKey.ReplaceUrlBadChar(Request.Form["hzCm"]);
email.HzHistory = SqlKey.ReplaceUrlBadChar(Request.Form["hzHistory"]);
email.HzSmoking = SqlKey.ReplaceUrlBadChar(Request.Form["smoking"]);
email.HzTipple = SqlKey.ReplaceUrlBadChar(Request.Form["tipple"]);
email.HzPregnancy = SqlKey.ReplaceUrlBadChar(Request.Form["pregnancy"]);
// Ò©Æ·ÐÅÏ¢
email.YpName = SqlKey.ReplaceUrlBadChar(Request.Form["ypName"]).Split(',');
email.IsBotai = SqlKey.ReplaceUrlBadChar(Request.Form["isBotai"]).Split(',');
email.YpCyUser_select = SqlKey.ReplaceUrlBadChar(Request.Form["ypCyUser_select"]).Split(',');
email.YpCyUser = SqlKey.ReplaceUrlBadChar(Request.Form["ypCyUser"]).Split(',');
email.YpPNumber = SqlKey.ReplaceUrlBadChar(Request.Form["ypPNumber"]).Split(',');
email.YpCNumber = SqlKey.ReplaceUrlBadChar(Request.Form["ypCNumber"]).Split(',');
email.YpDCFYL = SqlKey.ReplaceUrlBadChar(Request.Form["ypDCFYL"]).Split(',');
email.YpPC = SqlKey.ReplaceUrlBadChar(Request.Form["ypPC"]).Split(',');
email.YpForm = SqlKey.ReplaceUrlBadChar(Request.Form["ypForm"]).Split(',');
email.YpZLJB = SqlKey.ReplaceUrlBadChar(Request.Form["ypZLJB"]).Split(',');
email.YpQYDataYear1 = SqlKey.ReplaceUrlBadChar(Request.Form["ypQYDataYear1"]).Split(',');
email.YpQYDataYear2 = SqlKey.ReplaceUrlBadChar(Request.Form["ypQYDataYear2"]).Split(',');
email.Ypcuoshi = SqlKey.ReplaceUrlBadChar(Request.Form["ypcuoshi"]).Split(',');
email.YphbYongyao = SqlKey.ReplaceUrlBadChar(Request.Form["hbYongyao"]).Split(',');
// ²»Á¼ÊÂÎñ·´Ó³
email.AdverseEvent = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEvent"]).Split(',');
email.AdverseEventOfDateYear1 = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEventOfDateYear1"]).Split(',');
email.AdverseEventOfDateYear2 = SqlKey.ReplaceUrlBadChar(Request.Form["adverseEventOfDateYear2"]).Split(',');
email.Adverse_Result = SqlKey.ReplaceUrlBadChar(Request.Form["adverse_Result"]).Split(',');
email.Sequela = SqlKey.ReplaceUrlBadChar(Request.Form["sequela"]).Split(',');
email.Serious = SqlKey.ReplaceUrlBadChar(Request.Form["isSerious_hidden_list"]).Split(','); // ÊÇ·ñÑϳÁ
email.Xiangguan = SqlKey.ReplaceUrlBadChar(Request.Form["isSerious_hidden_list2"]).Split(','); // ÊÇ·ñÑϳÁµÄÁ˾Ö
email.Xiangguanxing = SqlKey.ReplaceUrlBadChar(Request.Form["xiangguanxing"]).Split(',');
email.Adverse_Content = Request.Form["adverse_Content"].Replace(",","£¬").Split(',');
// ÆäËû
email.Other_txt1 = SqlKey.ReplaceUrlBadChar(Request.Form["other_txt1"]);
email.Other_txt2 = SqlKey.ReplaceUrlBadChar(Request.Form["other_txt2"]);
var files = Request.Files;
if (files != null || files.Count > 0)
{
string path = "/UserReport/" + DateTime.Now.ToString("yyyy-MM-dd");
HttpPostedFile hfile = files[0];
var fileExt = Path.GetExtension(hfile.FileName);
if (!string.IsNullOrWhiteSpace(fileExt))
{
string localPath = Server.MapPath(path);
if (!Directory.Exists(localPath))
{
Directory.CreateDirectory(localPath);
}
string fileName = DateTime.Now.ToString("yyyyMMddHHssmm");
string newFileName = fileName + fileExt;
string localUrl = Server.MapPath(Path.Combine(path, newFileName));
hfile.SaveAs(localUrl);
file = path + "/" + newFileName; //Path.Combine(path, newFileName);
attfileurl = localUrl;
email.YpFile= attfileurl;
}
}
}
if (true)
{
// ±¾µØÐ´Îļþ
string sb = CreateHtml(email).ToString(); // ÎļþÄÚÈÝ
string[] fujian = new string[2]; // ¸½¼þÁбí
fujian[0] = WriteFile(Server.MapPath("~/Log/") + "Ò©Æ·²»Á¼·´Ó³¡¢ÊÂÎñ»ã±¨±í_" + DateTime.Now.ToString("yyyyMMddHHssmm") + ".doc", sb);// ´æÈë±¾µØ
//·¢ËÍÓʼþ
// fujian = null;
fujian[1] = "";
if (email.YpFile != null)
{
if (email.YpFile.Length > 0)
{
fujian[1] = email.YpFile;
}
}
System.Threading.Tasks.Task.Factory.StartNew(() =>
{
MyFunction.SendEmail(CreateHtml(email), fujian);
});
layer = "<script>layer.confirm('Ìá½»³É¹¦£¬ÕˆÆÚ´ýÞ’‘ª£¡', { btn:['´_¶¨']}, function() { window.location.href = '/contact.aspx?mid=160'; });</script>";
}
else
{
layer = "<script>layer.confirm('ÐÅÏ¢Ìύʧ”¡£¡', { btn:['´_¶¨']}, function() { window.location.href = '/contact.aspx?mid=160'; });</script>";
}
}
///<summary>
/// дÎļþ
/// </summary>
///<param name="Path">Îļþõè¾¶</param>///<param name="Strings">ÎļþÄÚÈÝ</param>
public string WriteFile(string Path, string Strings)
{
if (!System.IO.File.Exists(Path))
{
System.IO.FileStream f = System.IO.File.Create(Path);
f.Close();
}
System.IO.StreamWriter f2 = new System.IO.StreamWriter(Path, true, System.Text.Encoding.GetEncoding("UTF-8"));
f2.WriteLine(Strings);
f2.Close();
f2.Dispose();
return Path;
}
public void SaveStreamToFile(Stream inputStream, string filePath)
{
using (FileStream outputStream = new FileStream(filePath, FileMode.Create))
{
inputStream.CopyTo(outputStream);
}
}
private StringBuilder CreateHtml(NewEmailInfo ninfo)
{
StringBuilder builder = new StringBuilder();
#region ÐÎ×´ÐÅÏ¢
builder.AppendLine("<style type=\"text/css\">");
builder.AppendLine("body{font-family: ΢ÈíÑźÚ;}");
builder.AppendLine(@"table {
width: 100%;
border-collapse: collapse;
margin: 0 auto;
}
th,
td {
border: 1px solid #000000;
padding: 8px;
font-size: 12px;
text-align: center;font-family: ΢ÈíÑźÚ;
}
th { background-color: #f2f2f2;}
.hidden-input { display: none;}
.data-head { margin-top: 50px; }
p { margin: 0px;}
.data-head p {
font-weight: 600;
margin: 0px;
font-size: 18px;
}
.table-type,
.table-from {
width: 80%;
margin: 20px auto;
display: flex;
font-size: 18px;
}
.table-type label,
.table-from label {margin-right: 20px;cursor: pointer;white-space: nowrap; }
.table-from .value {flex-grow: 1;}
.table-from .label { white-space: nowrap; }
.data-head .title {background-color: rgb(242, 242, 242); }
.data-info {}
.data-info:nth-child(1) .header { /* border-top: 1px solid #000000 ; */ }
.data-info .header {
text-align: center;
font-size: 14px;
background-color: rgb(189, 214, 238);
}
.data-info td {min-height: 40px;}
.data-info th { text-align: center;}
.data-info .header-title th { font-weight: 500; background-color: #FFFFFF;}
.data-info tr td { min-height: 40px; height: 40px; }
.data-info tr td table td {}
.data-info table td { height: 100px; }
.layui-table-view {
width: 80%;
margin: 0 auto;
border-color: #000000;
}
.layui-table-box { width: 100%; }
.layui-table th {
background-color: #FFFFFF;
border-color: #000000;
text-align: center;
font-size: 12px;
font-weight: 500;
}
.layui-table-cell {
border-color: #000000;
text-align: center;
font-weight: 500;
font-size: 12px;
height: auto;
overflow: visible;
text-overflow: inherit;
white-space: normal;
}
.layui-table-body { border-color: #000000;}
.layui-table {margin: 0 auto; width: 100%;}
.layui-table td { border-color: #000000;font-size: 12px;font-family: ΢ÈíÑźÚ;}
.layui-table-box { border-color: #000000; }
.layui-table-body { border-top: 1px solid #000000; }");
builder.AppendLine("</style>");
#endregion
#region ±íÍ·ÐÅÏ¢
builder.AppendLine("<table class=\"data-head\">");
builder.AppendLine("<tr>");
//builder.AppendLine("<td rowspan = \"2\" width=\"100px\" style=\"text-align: center;\">");
//builder.AppendLine("<img src= \"https://kelun-biotech.com/image/table-logo.png\" alt=\"\">");
//builder.AppendLine("</td>");
builder.AppendLine("<td colspan=\"4\" style=\"text-align: center;\">");
builder.AppendLine("<h3 style='font-size:20px'>¸öÀýÒ©Æ·²»Á¼·´Ó³»ã±¨±í</h3>");
builder.AppendLine("</td></tr>");
//builder.AppendLine("<tr>");
//builder.AppendLine("<td class=\"title\" style=\"text-align: left;\"><p>Îļþ±àÂë:</p><p>Document No.:</p></td>");
//builder.AppendLine("<td><div class=\"no\" style=\"text-align: left;\">SOP-60-0001-R01</div></td>");
//builder.AppendLine("<td class=\"title\" style=\"text-align: left;\"><p>°æ±¾ºÅ:</p><p>Version:</p></td>");
//builder.AppendLine("<td><div class=\"no\" style=\"text-align: left;\"> 1.0.0</div></td></tr>");
builder.AppendLine("</table>");
//// »ã±¨ÀàÐÍ
//builder.AppendLine("<div class=\"table-type\">");
//builder.AppendLine("<label><input type=\"radio\" name=\"reportSource3\" value=\"ÑϳÁ»ã±¨\">ÑϳÁ»ã±¨</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"¾³±í»ã±¨\">¾³±í»ã±¨</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"³õ´Î»ã±¨\">³õ´Î»ã±¨</label>" +
// "<label><input type=\"radio\" name=\"reportSource3\" value=\"¸ú×ٻ㱨\">¸ú×ٻ㱨(×î½üÒ»´Î»ñÖª¹¦·ò£º" +
// "<input type=\"text\" placeholder=\"ÇëÊäÈë\" style=\"border: none;border-bottom: 1px solid;font-size: 18px;outline: none;\" >)</label></div>");
//// »ã±¨ÆðÔ´
//builder.AppendLine("<div class=\"table-from\"><div class=\"label\">»ã±¨ÆðÔ´:</div>");
//builder.AppendLine("<div class=\"value\">" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"Ò½ÁÆ»ú¹¹\">Ò½ÁÆ»ú¹¹</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"¾ÓªÆóÒµ\">¾ÓªÆóÒµ</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"Ó×ÎÒ\">Ó×ÎÒ</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"Îļþ\">Îļþ</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"×êÑÐ\">×êÑÐ</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"ÏîÄ¿\">ÏîÄ¿</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"Îļþ\">Îļþ</label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"ÆäËû\">ÆäËû<input type=\"text\" placeholder=\"ÇëÊäÈë\" style=\"border: none;border-bottom: 1px solid;font-size: 18px;outline: none;\"></label>" +
// "<label><input type=\"radio\" name=\"reportSource2\" value=\"¼à¹Ü»ú¹¹\">¼à¹Ü»ú¹¹</label></div></div>");
#endregion
#region »ã±¨ÆðÔ´ÐÅÏ¢
builder.AppendLine("<table class=\"data-info\">");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan =\"6\" class=\"header\">»ã±¨ÆðÔ´ÐÅÏ¢</th></tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th>µÚÒ»½Ó¹ÜÈË</th>");
builder.AppendLine("<th>ÁªÏµµç»°</th>");
builder.AppendLine("<th>EmailµØÖ·</th>");
builder.AppendLine("<th colspan=\"2\">µÚÒ»½Ó¹ÜÈË»ñÖª¹¦·ò</th>");
builder.AppendLine("<th>Æ¬Çø/¹¤ºÅ</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style =\"color:red;font-size:14px;\">");
builder.AppendLine("<td>" + email.FirstName + email.LastName + "</td>");
builder.AppendLine("<td>" + email.UserTelPhone + "</td>");
builder.AppendLine("<td>" + email.UserEmaul + "</td>");
builder.AppendLine("<td colspan=\"2\">" + email.userGetDate + "</td>");
builder.AppendLine("<td>" + email.UserNo + "</td>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th>»ã±¨ÕßÐÕÃû</th>");
builder.AppendLine("<th>»ã±¨Õߵ绰</th>");
builder.AppendLine("<th>»ã±¨ÕßEmail</th>");
builder.AppendLine("<th>Ö°Òµ</th>");
builder.AppendLine("<th>µ¥Ôª</th>");
builder.AppendLine("<th>»ã±¨ÕßÊÇ·ñ½ÓÊÜËæ·Ã</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style=\"color: red;font-size:14px;\" >");
builder.AppendLine("<td>" + email.BgFirstName + email.BgLastName + "</td>");
builder.AppendLine("<td>" + email.BgTelPhone + "</td>");
builder.AppendLine("<td>" + email.BgEmail + "</td>");
if (email.BgJobType_Ccareer.Equals("yiliaobaojian"))
{
email.BgJobType_Ccareer = "Ò½ÁƱ£½¡×¨ÒµÈËÔ±(" + email.BgJobTypeName + ")";
}
if (email.BgJobType_Ccareer.Equals("ÆäËû"))
{
email.BgJobType_Ccareer = email.BgJobType_Ccareer + "(" + email.BgOtherJob + ")";
}
builder.AppendLine("<td>" + email.BgJobType_Ccareer + "</td>");
builder.AppendLine("<td>" + email.BgUserCompany + "</td>");
builder.AppendLine("<td>" + email.FollowUp + "</td>");
builder.AppendLine("</tr></tbody></table>");
#endregion
#region »¼ÕßÐÅÏ¢
builder.AppendLine("<table class=\"data-info\" >");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan=\"8\" class=\"header\" style=\"border-top: none;\">»¼ÕßÐÅÏ¢</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th width=\"80\">ÐÕÃû</th>");
builder.AppendLine("<th width=\"80\">ÐÔ±ð</th>");
builder.AppendLine("<th width=\"80\">´ºÇï</th>");
builder.AppendLine("<th width=\"80\">µ®ÉúÈÕÆÚ</th>");
builder.AppendLine("<th width=\"80\">Ãñ×å</th>");
builder.AppendLine("<th width=\"80\">Ìå³Á(kg)</th>");
builder.AppendLine("<th width=\"80\">Éí¸ß(cm)</th>");
builder.AppendLine("<th>Ô»¼¼²²¡</th>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr style=\"color:red;font-size:14px;\" >");
builder.AppendLine("<td>" + email.HzXing + email.HzMing + "</td>");
builder.AppendLine("<td>" + email.HzSex + "</td>");
builder.AppendLine("<td>" + email.HzAge + "</td>");
builder.AppendLine("<td>" + email.HzYear + "</td>");
builder.AppendLine("<td>" + email.HzMinZu + "</td>");
builder.AppendLine("<td>" + email.HzKg + "</td>");
builder.AppendLine("<td>" + email.HzCm + "</td>");
builder.AppendLine("<td>" + email.HzHistory + "</td>");
builder.AppendLine("</tr>");
builder.AppendLine("<tr class=\"header-title\" style=\"color:red;font-size:14px;font-weight:600;\">");
builder.AppendLine("<th style=\"color: #000000;\" >ÎüÑÌÊ·</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzSmoking + "");
builder.AppendLine("</th>");
builder.AppendLine("<th style=\"color: #000000;\" >Òû¾ÆÊ·</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzTipple + "");
builder.AppendLine("</th>");
builder.AppendLine("<th style=\"color: #000000;\" >ÊÇ·ñ»³Ì¥</th>");
builder.AppendLine("<th colspan=\"2\">");
builder.AppendLine("" + email.HzPregnancy + "");
builder.AppendLine("</th>");
builder.AppendLine("</tr></tbody></table>");
#endregion
#region Ò©Æ·ÐÅÏ¢
/*Ò©Æ·ÐÅϢͷ²¿*/
builder.AppendLine("<table class=\"data-info\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-collapse: collapse;\" >");
builder.AppendLine("<tbody>");
builder.AppendLine("<th colspan=\"9\" class=\"header\" style=\"border-top: none;\">Ò©Æ·ÐÅÏ¢</th></tr>");
builder.AppendLine("</tbody>");
builder.AppendLine("</table>");
/*Ò©Æ·ÐÅϢͷ²¿*/
/*Ò©Æ·ÐÅÏ¢ÕýÎÄ*/
builder.AppendLine("<table class=\"layui-table\" id=\"ID-table-demo-theads-1\">");
builder.AppendLine("<thead><tr>");
builder.AppendLine("<th lay-data=\"{field:'username',width: 80}\" rowspan=\"2\">ÒÉ»ó/²¢ÓÃÒ©Æ·</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">ºË×¼ÎĺÅ</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">ͨÓÃÃû³Æ</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">²úÆ·ÅúºÅ</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">ÉÏÊÐÐí¿É³ÖÓÐÈË</th>");
builder.AppendLine("<th lay-data=\"{align:'center'}\" colspan=\"3\">Ó÷¨ÓÃÁ¿</th>");
builder.AppendLine("<th lay-data=\"{align:'center'}\" colspan=\"2\">ÓÃÒ©ÈÕÆÚ</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">Ò½Öμ²²¡</th>");
builder.AppendLine("<th lay-data=\"{field:'amount'}\" rowspan=\"2\">¶ÔÒ©Æ·²ÉÈ¡µÄ´ëÊ©</th>");
builder.AppendLine("</tr><tr>");
builder.AppendLine("<th lay-data=\"{field:'province', width: 100}\">µ¥´Î¼ÁÁ¿</th>");
builder.AppendLine("<th lay-data=\"{field:'city', width: 100}\">¸øÒ©Æµ´Î</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">¸øÒ©õè¾¶</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">Æð</th>");
builder.AppendLine("<th lay-data=\"{field:'zone', width: 100}\">Ö¹</th>");
builder.AppendLine("</tr></thead>");
builder.AppendLine("<tbody style='color:#ff0000'>");
// ÒÉ»óÓÃÒ©
// Ñ»·¶àÐÐ
for (int i = 0; i < email.YpPNumber.Length; i++)
{
if (i == 0)
{
builder.AppendLine("<tr>");
builder.AppendLine("<td style='color:#000' rowspan=\"" + email.YpPNumber.Length + "\">ÒÉ»óÒ©Æ·</td>");
}
else
{
builder.AppendLine("<tr>");
}
builder.AppendLine("<td>" + email.YpPNumber[i] + "</td>");
builder.AppendLine("<td>" + email.YpName[i] + "</td>");
builder.AppendLine("<td>" + email.YpCNumber[i] + "</td>");
if (email.IsBotai[i].Equals("·ñ")) // ÆäËû¹«Ë¾
{
builder.AppendLine("<td>" + email.YpCyUser[i] + "</td>");
}
else
{
builder.AppendLine("<td>" + email.YpCyUser_select[i] + "</td>");
}
builder.AppendLine("<td>" + email.YpDCFYL[i] + "</td>");
builder.AppendLine("<td>" + email.YpPC[i] + "</td>");
builder.AppendLine("<td>" + email.YpForm[i] + "</td>");
builder.AppendLine("<td>" + email.YpQYDataYear1[i] + "</td>");
builder.AppendLine("<td>" + email.YpQYDataYear2[i] + "</td>");
builder.AppendLine("<td>" + email.YpZLJB[i] + "</td>");
try
{
builder.AppendLine("<td>" + email.Ypcuoshi[i] + "</td>");
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
builder.AppendLine("</tr>");
}
/*²¢ÓÃÒ©Æ·*/
var hbStr = "";
for (int i = 0; i < email.YphbYongyao.Length; i++)
{
if (i == 0)
{
builder.AppendLine("<tr>");
builder.AppendLine("<td style='color:#000' rowspan='" + email.YphbYongyao.Length + "'>²¢ÓÃÒ©Æ·</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td>" + email.YphbYongyao[i] + "</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("</tr>");
}
else
{
builder.AppendLine("<tr>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td>" + email.YphbYongyao[i] + "</td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("<td></td>");
builder.AppendLine("</tr>");
}
}
//builder.AppendLine("<td colspan=\"11\">"+ hbStr + "</td>"); hbStr += email.YphbYongyao[i] + ",";
builder.AppendLine("</tbody></table>");
/*Ò©Æ·ÐÅÏ¢ÕýÎÄ*/
#endregion
#region ²»Á¼·´Ó³
builder.AppendLine("<table class=\"data-info\">");
builder.AppendLine("<tbody>");
builder.AppendLine("<tr><th colspan=\"7\" class=\"header\" style=\"border-top:none;\">²»Á¼·´Ó³</th></tr>");
builder.AppendLine("<tr class=\"header-title\">");
builder.AppendLine("<th width=\"120\">²»Á¼·´Ó³ÊõÓï</th>");
builder.AppendLine("<th>²úÉú¹¦·ò</th>");
builder.AppendLine("<th>ʵÏÖ¹¦·ò</th>");
builder.AppendLine("<th>²»Á¼·´Ó³Á˾Ö</th>");
builder.AppendLine("<th>ÊÇ·ñÑϳÁ</th>");
builder.AppendLine("<th>ÑϳÁÐԳ߶È</th>");
builder.AppendLine("<th>»ã±¨Õ߯À¼Û</th></tr>");
// Ñ»·¶àÐÐ
//this.Response.Write(email.AdverseEvent.Length+"<br/>");
//this.Response.Write(email.Adverse_Result.Length);
//this.Response.End();
for (int i = 0; i < email.AdverseEvent.Length; i++)
{
builder.AppendLine("<tr style=\"color: red;\">");
builder.AppendLine("<td>" + email.AdverseEvent[i] + "</td>");
builder.AppendLine("<td>" + email.AdverseEventOfDateYear1[i] + "</td>");
builder.AppendLine("<td>" + email.AdverseEventOfDateYear2[i] + "</td>");
// ûѡֵÎÞ·¨»ñÈ¡ÏÂ±ê ±¨´í»ñÈ¡´¦ÖÃ
try
{
if (email.Adverse_Result[i] != null)
{
if (email.Adverse_Result[i].Equals("ÓкóÒÅÖ¢"))
{
builder.AppendLine("<td>" + email.Adverse_Result[i] + "(" + email.Sequela[i] + ")</td>");
}
else
{
builder.AppendLine("<td>" + email.Adverse_Result[i] + "</td>");
}
}
}
catch (Exception)
{
// ûѡÔñ¾ÍÊÇ¿Õ
builder.AppendLine("<td></td>");
}
try
{
if (email.Serious[i] == null)
{
builder.AppendLine("<td></td>");
}
else
{
builder.AppendLine("<td>" + email.Serious[i] + "</td>");
}
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
try
{
//ÊÇ·ñÑϳÁµÄÁ˾֣¬Ñ¡ÔñÊÇ ±ØÒª¼Í¼ ¶ÔÓ¦Á˾Ö
if (email.Serious[i].Equals("ÊÇ"))
{
builder.AppendLine("<td>" + email.Xiangguan[i] + "</td>");
}
else
{ // Ñ¡Ôñ²»È»ÎÞÄÚÈÝ
builder.AppendLine("<td></td>");
}
}
catch (Exception)
{
builder.AppendLine("<td></td>");
}
try
{
builder.AppendLine("<td>" + email.Xiangguanxing[i] + "</td></tr>");
}
catch (Exception)
{
builder.AppendLine("<td></td></tr>");
}
}
builder.AppendLine("<tr><td colspan=\"7\" style=\"text-align:left;\">²»Á¼·´Ó³¹ý³ÌÃèÊö£¨Ô̺¬²úÉú³¡Ëù¡¢Ö¢×´¡¢ÌåÕ÷¡¢ÁÙ´²¼ìÑéµÈ£©¼°´¦ÖÃÇé¿ö£¨¿É¸½Ò³£©£º<span style='word-wrap:break-word;word-break:break-all;color:#ff0000'>" + email.Adverse_Content[0] + "</span></td></tr>");
builder.AppendLine("<tr>");
builder.AppendLine("<td colspan=\"7\" style=\"text-align:left;\">³õ´Î»ñÖª¹¦·ò£º ÆóÒµ²¡Àý±àÂ룺 <br/>ÊÜÀíÈË: ÊÜÀíÈÕÆÚ: ÊÇ·ñ±ØÒªËæ·Ã/µ÷²é/²ÉȡӦ¼±´¦ÖôëÊ©:</td></tr>");
builder.AppendLine("<tr><td style=\"text-align:center;letter-spacing:5px;background-color: rgb(189, 214, 238);font-size: 12px;\">±¸×¢:</td>");
builder.AppendLine("<td colspan=\"6\" style=\"text-align: left;\">");
builder.AppendLine("<p style=\"font-size:12px;line-height:30px;\">ÆäËûÐè×¢Ã÷µÄÇé¿ö£º</p>");
builder.AppendLine("<p style=\"font-size:12px;line-height: 30px;\">»¼ÕßÊÇ·ñ¶ÔÈκÎÒ©ÎʳƷ»òÆäËû²úÆ·¹ýÃô:</p>");
builder.AppendLine("<p style='color:#ff0000'>" + email.Other_txt1 + "</p><p style=\"font-size:12px;line-height: 30px;\">ÆäËûÕï¶Ï¼²²¡/²¡Ê·/ÂýÐÔ½¡È«Çé¿ö:</p><p style='color:#ff0000'>" + email.Other_txt2 + "</p></td></tr></tbody></table>");
#endregion
#region Ðû¸æ²¿ÃÅ
//builder.AppendLine("<table class=\"data-info\" style=\"margin-top:60px;\" style=\"border-top: none;\">");
//builder.AppendLine("<tbody>");
//builder.AppendLine("<tr class=\"header-title\">");
//builder.AppendLine("<th width=\"200\" style=\"background-color: rgb(242, 242, 242);\">");
//builder.AppendLine("<p>Ðû¸æ²¿ÃÅ</p><p>Distribute Department</p></th>");
//builder.AppendLine("<th colspan=\"3\" style=\"text-align: left;\">QA·Ö²¿2024.05.13</th>");
//builder.AppendLine("<th width=\"150\" style=\"background-color: rgb(242, 242, 242);text-align: center;\">");
//builder.AppendLine("<p>Ò³Âë</p>");
//builder.AppendLine("<p>Page</p>");
//builder.AppendLine("</th><th>1 / 1</th></tr>");
//builder.AppendLine("<tr>");
//builder.AppendLine("<td style=\"background-color:rgb(242, 242, 242); text-align:center;\">");
//builder.AppendLine("<p>´òÓ¡½Ó¹ÜÈË</p><p>Received by</p></td>");
//builder.AppendLine("<td style=\"text-align: center;\"> N / A </td >");
//builder.AppendLine("<td width=\"150\" style=\"background-color: rgb(242, 242, 242); text-align: center;\" >");
//builder.AppendLine("<p>´òÓ¡¹¦·ò</p>");
//builder.AppendLine("<p>Print date</p></td>");
//builder.AppendLine("<td style=\"text-align:center; \"> N / A </td>");
//builder.AppendLine("<td style=\"background-color: rgb(242, 242, 242); text-align:center; \">");
//builder.AppendLine("<p>´òÓ¡·Ö·¢ºÅ</p><p>Distribution No.</p></td>");
//builder.AppendLine("<td style=\"text-align:center;\"> N / A </td></tr></tbody></table>");
#endregion
return builder;
}
}
#line default
#line hidden