Browse Source

未登錄時已付款下單的Mail修改

Dev
alina 2 years ago
parent
commit
257f80190a
  1. 241
      EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMail.cs
  2. 9
      EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs

241
EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMail.cs

@ -2502,137 +2502,136 @@ namespace EasyBL.WEBAPP.SYS
}
//Payment Received 未登入
//Alina這邊這邊
//public string PaymentReceived_NoLogin(View_SAL_BookingOnline BookingOnlineModel)
//{
public string PaymentReceived_NoLogin(View_SAL_BookingOnline BookingOnlineModel)
{
// StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
// EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
// sb.Append(mailTemplate.MailHeader());
// sb.Append(mailTemplate.MailCSS());
// sb.Append(mailTemplate.MailShowEasyLogo());
// //Email Body
// sb.Append("<tr>");
// sb.Append("<td style = \"padding: 0 50px 0 50px; background-color: #f8f8f8\" class=\"sm-p bar\">");
// sb.Append("<table border=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width: 100%\">");
// sb.Append("<tr>");
// sb.Append("<td>");
// sb.Append("<table border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\" align = \"left\"> ");
// sb.Append("<tr>");
// sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block; padding-top: 30px; padding-left: 30px; padding-right: 30px;padding-bottom: 30px; font-family: arial, sans-serif; color: #000000; text-align: left;\"> ");
// sb.Append("<img style = \"display: block\" src = \"https://d3kpqi6h465b7i.cloudfront.net/email/u_grin.png \" width = \"40\" height = \"40\"/> ");
// sb.Append("</td>");
// sb.Append("</tr>");
// //Text:您好,Janie,
// sb.Append("<tr>");
// sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
// sb.Append("<h1 style = \"font-family: 'arial', 'sans-serif'; font-weight: 700; font-size: 16px; line-height: 18px; color: #000000; margin: 0 0 0 0;\">");
// sb.Append("你好");
// sb.Append("</h1>");
// sb.Append("</td>");
// sb.Append("</tr>");
// //Text:我們已經成功收到你的付款!
// sb.Append("<tr>");
// sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
// sb.Append("<p style = \"font-weight: 400;font-size: 12px;line-height: 14px;letter-spacing: 0.02em;font-family: 'arial', 'sans-serif';margin: 0 0 0px;\" class=\"has-markdown\">");
// sb.Append("我們已經成功收到你的付款!<br />");
// sb.Append("<br />");
// sb.Append("*附件為此訂單的訂單明細<br />");
// sb.Append("</p>");
// sb.Append("</td>");
// sb.Append("</tr>");
// //Text:訂單資訊
// sb.Append("<tr>");
// sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: left;\">");
// sb.Append("<p style = \"font-weight: 400;font-size: 12px;line-height: 14px;letter-spacing: 0.02em;font-family: 'arial', 'sans-serif';margin: 0 0 0px;\" class=\"has-markdown\">");
// sb.Append("訂單資訊:");
// sb.Append("</p>");
// sb.Append("</td>");
// sb.Append("</tr>");
// //Button:service card start ----------------------------------------------------
// sb.Append("<tr style=\"padding: 0 50px 0 50px; background-color: #f8f8f8;border: #f1f1f1; border-radius: 20px;border-width: 1px;\">");
// sb.Append("<td bgcolor = \"#FEFEFE\" width=\"340px\" style = \"display: block;padding-top: 25px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: left;\"> ");
// sb.Append("<table style=\"border: solid #f1f1f1;\">");
// sb.Append("<tbody>");
// sb.Append("<tr>");
// //service img
// sb.Append("<td valign=\"top\" style=\"padding: 10px;\">");
// //sb.Append("<img style =\"display: block;padding-right: 10px;\" src = \"https://d3kpqi6h465b7i.cloudfront.net/email/icon-facebook.png\" width = '30' height = '30'/>");
// sb.Append("<img style =\"display: block;padding-right: 10px;margin-top: 25px;\" src = \"");
// sb.Append(BookingOnlineModel.ServicePictrue);
// sb.Append("\" width = '30' height = '30'/>");
sb.Append(mailTemplate.MailHeader());
sb.Append(mailTemplate.MailCSS());
sb.Append(mailTemplate.MailShowEasyLogo());
//Email Body
sb.Append("<tr>");
sb.Append("<td style = \"padding: 0 50px 0 50px; background-color: #f8f8f8\" class=\"sm-p bar\">");
sb.Append("<table border=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width: 100%\">");
sb.Append("<tr>");
sb.Append("<td>");
sb.Append("<table border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\" align = \"left\"> ");
sb.Append("<tr>");
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block; padding-top: 30px; padding-left: 30px; padding-right: 30px;padding-bottom: 30px; font-family: arial, sans-serif; color: #000000; text-align: left;\"> ");
sb.Append("<img style = \"display: block\" src = \"https://d3kpqi6h465b7i.cloudfront.net/email/u_grin.png \" width = \"40\" height = \"40\"/> ");
sb.Append("</td>");
sb.Append("</tr>");
//Text:您好,Janie,
sb.Append("<tr>");
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
sb.Append("<h1 style = \"font-family: 'arial', 'sans-serif'; font-weight: 700; font-size: 16px; line-height: 18px; color: #000000; margin: 0 0 0 0;\">");
sb.Append("你好");
sb.Append("</h1>");
sb.Append("</td>");
sb.Append("</tr>");
//Text:我們已經成功收到你的付款!
sb.Append("<tr>");
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
sb.Append("<p style = \"font-weight: 400;font-size: 12px;line-height: 14px;letter-spacing: 0.02em;font-family: 'arial', 'sans-serif';margin: 0 0 0px;\" class=\"has-markdown\">");
sb.Append("我們已經成功收到你的付款!<br />");
sb.Append("<br />");
sb.Append("*附件為此訂單的訂單明細<br />");
sb.Append("</p>");
sb.Append("</td>");
sb.Append("</tr>");
//Text:訂單資訊
sb.Append("<tr>");
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: left;\">");
sb.Append("<p style = \"font-weight: 400;font-size: 12px;line-height: 14px;letter-spacing: 0.02em;font-family: 'arial', 'sans-serif';margin: 0 0 0px;\" class=\"has-markdown\">");
sb.Append("訂單資訊:");
sb.Append("</p>");
sb.Append("</td>");
sb.Append("</tr>");
//Button:service card start ----------------------------------------------------
sb.Append("<tr style=\"padding: 0 50px 0 50px; background-color: #f8f8f8;border: #f1f1f1; border-radius: 20px;border-width: 1px;\">");
sb.Append("<td bgcolor = \"#FEFEFE\" width=\"340px\" style = \"display: block;padding-top: 25px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: left;\"> ");
sb.Append("<table style=\"border: solid #f1f1f1;\">");
sb.Append("<tbody>");
sb.Append("<tr>");
//service img
sb.Append("<td valign=\"top\" style=\"padding: 10px;\">");
//sb.Append("<img style =\"display: block;padding-right: 10px;\" src = \"https://d3kpqi6h465b7i.cloudfront.net/email/icon-facebook.png\" width = '30' height = '30'/>");
sb.Append("<img style =\"display: block;padding-right: 10px;margin-top: 25px;\" src = \"");
sb.Append(BookingOnlineModel.ServicePictrue);
sb.Append("\" width = '30' height = '30'/>");
// sb.Append("</td>");
// //booking status
// sb.Append("<td style=\"padding-top: 25px;\">");
// sb.Append("<h1 style =\"padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;font-size: 14px;line-height: 18px;color: #7997ff;margin: 0 0 0 0;\">");
// sb.Append("訂單已完成,<span style=\"color: #2dc695;\">已付款</span>");
// sb.Append("</h1>");
// //service name
// sb.Append("<h1 style =\"padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
// //sb.Append("包車遊覽|新北景點一日遊:九份&平溪&北海岸");
// sb.Append(BookingOnlineModel.ServiceName);
// sb.Append("</h1>");
// //booking number
// sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// //sb.Append("#B35553244AC");
// sb.Append(BookingOnlineModel.BookingNo);
// sb.Append("</h1>");
// //service content
// //sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// //sb.Append("接送服務, 台北市, 四人座車型 x 1");
// //sb.Append("</h1>");
// var lstT = new List<string>();
// var objval = BookingOnlineModel.BookingItem.ToString();
// if (!string.IsNullOrEmpty(objval) && objval != "[]")
// {
// lstT = JsonConvert.DeserializeObject<List<string>>(objval.ToString());
// }
// foreach (var item in lstT)
// {
sb.Append("</td>");
//booking status
sb.Append("<td style=\"padding-top: 25px;\">");
sb.Append("<h1 style =\"padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;font-size: 14px;line-height: 18px;color: #7997ff;margin: 0 0 0 0;\">");
sb.Append("訂單已完成,<span style=\"color: #2dc695;\">已付款</span>");
sb.Append("</h1>");
//service name
sb.Append("<h1 style =\"padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
//sb.Append("包車遊覽|新北景點一日遊:九份&平溪&北海岸");
sb.Append(BookingOnlineModel.ServiceName);
sb.Append("</h1>");
//booking number
sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
//sb.Append("#B35553244AC");
sb.Append(BookingOnlineModel.BookingNo);
sb.Append("</h1>");
//service content
//sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// sb.Append(item);
//sb.Append("接送服務, 台北市, 四人座車型 x 1");
//sb.Append("</h1>");
// }
// //service time
// sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// //sb.Append("服務時間: 2022.09.20 08:00 (當地時間)");
// sb.Append("服務時間: " + BookingOnlineModel.ServiceDateSFormat + " (當地時間)");
// sb.Append("</h1>");
// //booking time
// sb.Append("<h1 style =\"padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// // sb.Append("訂購時間: 2022.07.20 12:00");
// sb.Append("訂購時間: " + BookingOnlineModel.BookingDateFormat);
// sb.Append("</h1>");
// //cost
// sb.Append("<h1 style =\"padding-bottom: 10px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
// //sb.Append("$3,500 台幣");
// sb.Append("$" + int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###") + " " + BookingOnlineModel.CurrencyName);
// sb.Append("</h1>");
// sb.Append("</td>");
// sb.Append("</tr>");
// sb.Append("</tbody>");
// sb.Append("</table>");
// sb.Append("</td>");
// sb.Append("</tr>");
// sb.Append("</tr>");
// sb.Append("</table>");
// sb.Append("</td>");
// sb.Append("</tr>");
// sb.Append("</table>");
// sb.Append("</td>");
// sb.Append("</tr>");
// //sb.Append(mailTemplate.MailButtom());
// sb.Append(mailTemplate.MailFooter());
var lstT = new List<string>();
var objval = BookingOnlineModel.BookingItem.ToString();
if (!string.IsNullOrEmpty(objval) && objval != "[]")
{
lstT = JsonConvert.DeserializeObject<List<string>>(objval.ToString());
}
foreach (var item in lstT)
{
sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
sb.Append(item);
sb.Append("</h1>");
}
// return sb.ToString();
//service time
sb.Append("<h1 style =\"padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
//sb.Append("服務時間: 2022.09.20 08:00 (當地時間)");
sb.Append("服務時間: " + BookingOnlineModel.ServiceDateSFormat + " (當地時間)");
sb.Append("</h1>");
//booking time
sb.Append("<h1 style =\"padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 12px;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
// sb.Append("訂購時間: 2022.07.20 12:00");
sb.Append("訂購時間: " + BookingOnlineModel.BookingDateFormat);
sb.Append("</h1>");
//cost
sb.Append("<h1 style =\"padding-bottom: 10px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
//sb.Append("$3,500 台幣");
sb.Append("$" + int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###") + " " + BookingOnlineModel.CurrencyName);
sb.Append("</h1>");
sb.Append("</td>");
sb.Append("</tr>");
sb.Append("</tbody>");
sb.Append("</table>");
sb.Append("</td>");
sb.Append("</tr>");
sb.Append("</tr>");
sb.Append("</table>");
sb.Append("</td>");
sb.Append("</tr>");
sb.Append("</table>");
sb.Append("</td>");
sb.Append("</tr>");
//sb.Append(mailTemplate.MailButtom());
sb.Append(mailTemplate.MailFooter());
return sb.ToString();
//}
}
}

9
EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_UpdService.cs

@ -603,7 +603,16 @@ namespace EasyBL.WEBAPP.WSM
{
//已付款
oEmail.Title = "訂單已確認已付款通知";
if (string.IsNullOrEmpty(objBookingOnline.Account))
{
//未登錄,沒有查看訂單按鈕
oEmail.EmailBody = new BookingMail().PaymentReceived_NoLogin(objBookingOnline);
}
else
{
oEmail.EmailBody = new BookingMail().PaymentReceived(objBookingOnline);
}
} else if (oNewEntity.PaymentStatus == "04") {
//退款中
oEmail.Title = "取消訂單退款中通知";

Loading…
Cancel
Save