You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2039 lines
131 KiB
2039 lines
131 KiB
|
|
using EasyBL.WebApi;
|
|
using EasyBL.WebApi.Common;
|
|
using EasyBL.WebApi.Message;
|
|
using EasyNet;
|
|
using Entity.ShowEasyDtos;
|
|
using Entity.Sugar;
|
|
using Entity.ViewModels;
|
|
using Newtonsoft.Json;
|
|
using SqlSugar;
|
|
using SqlSugar.Base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Net.Mail;
|
|
using EasyBL.WEBAPP.ShowEasy;
|
|
|
|
namespace EasyBL.WEBAPP.SYS
|
|
{
|
|
public class BookingMail : ServiceBase
|
|
{
|
|
//Received Booking Mail Template
|
|
public string ReceivedBooking(View_SAL_BookingOnline BookingOnlineModel, string Name)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
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("你好," + Name + ",");
|
|
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("我們成功收到了你的訂單。");
|
|
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;padding-bottom: 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("等待確認中");
|
|
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("<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>");
|
|
}
|
|
|
|
|
|
//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: 25px;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("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"width: 88px;background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
//sb.Append("前往付款");
|
|
//sb.Append("</a>");
|
|
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
//sb.Append("<tr>");
|
|
//sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
//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("<a href =\"");
|
|
//sb.Append(Server + "/api/Signup/VerifyAccount?");
|
|
//sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
//sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
//sb.Append("</a>");
|
|
//sb.Append("</p>");
|
|
//sb.Append("</td>");
|
|
//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();
|
|
|
|
}
|
|
|
|
//Booking Complete Mail Template (訂單完成,已付款)
|
|
public string BookingComplete(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
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\"> ");
|
|
//Text:您好,Janie,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;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("你好," + BookingOnlineModel.MemberName + ",");
|
|
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("謝謝你使用ShowEasy,我們希望你有個美好的旅程。<br />");
|
|
sb.Append("請告訴我們更多關於你的體驗及感想!");
|
|
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("訂單完成,已付款");
|
|
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("<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>");
|
|
}
|
|
|
|
//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>");
|
|
//see you soon
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style =\"display: block;padding-bottom: 30px;padding-top: 45px;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>");
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
//Payment Received Mail Template 訂單已確認已付款
|
|
public string PaymentReceived(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
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("你好," + BookingOnlineModel.MemberName + ",");
|
|
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("<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>");
|
|
}
|
|
|
|
//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("<tr>");
|
|
sb.Append("<td bgcolor =\"#FEFEFE\" style =\"display: block;padding-top: 30px;font-family: arial, sans-serif;color: #232323;text-align: left;\">");
|
|
sb.Append("<table align =\"center\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td class=\"s-btn s-btn__primary\" style=\"border-radius: 16px; background: #ee9546\">");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
|
|
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
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("<a href =\"");
|
|
//sb.Append(Server + "/api/Signup/VerifyAccount?");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
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();
|
|
|
|
}
|
|
|
|
//Received Order Mail Template
|
|
public string ReceivedOrder(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:hi
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;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-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("收到訂單囉~");
|
|
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-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>");
|
|
sb.Append("<tbody>");
|
|
sb.Append("<tr>");
|
|
//service img
|
|
sb.Append("<td valign=\"top\">");
|
|
// 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;\" src = \"");
|
|
sb.Append(BookingOnlineModel.ServicePictrue);
|
|
sb.Append("\" width = '30' height = '30'/>");
|
|
|
|
sb.Append("</td>");
|
|
//booking status
|
|
sb.Append("<td>");
|
|
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;\">");
|
|
if (BookingOnlineModel.ConfirmDays == "01")
|
|
{
|
|
//立即回復既是bypass的流程
|
|
sb.Append("訂單正在進行中");
|
|
}
|
|
else
|
|
{
|
|
sb.Append("等待確認中");
|
|
}
|
|
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("<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>");
|
|
}
|
|
|
|
//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: 15px;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>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
//sb.Append("<tr>");
|
|
//sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
//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("<a href =\"");
|
|
//sb.Append(Server + "/api/Signup/VerifyAccount?");
|
|
//sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
//sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
//sb.Append("</a>");
|
|
//sb.Append("</p>");
|
|
//sb.Append("</td>");
|
|
//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();
|
|
|
|
}
|
|
|
|
//Booking Processing Mail Template
|
|
public string BookingProcessing(string Name,string BookingNo)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
// var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:您好,Janie,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;adding-bottom: 10px;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("你好," + Name + ",");
|
|
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: 30px;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("如有任何問題歡迎直接與我們聯繫。");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//查看訂單按鈕
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor =\"#FEFEFE\" style =\"display: block;padding-top: 30px;font-family: arial, sans-serif;color: #232323;text-align: left;\">");
|
|
sb.Append("<table align =\"center\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td class=\"s-btn s-btn__primary\" style=\"border-radius: 16px; background: #ee9546\">");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
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("<a href =\"");
|
|
//sb.Append(Server + "/api/Signup/VerifyAccount?");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
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();
|
|
|
|
}
|
|
|
|
//Status Change 銀行匯款 Mail Template
|
|
public string PayByTransfer(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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_check-circle.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-bottom: 10px;padding-top: 10px;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("你好," + BookingOnlineModel.MemberName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:恭喜你!你預定的項目已被確認。
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;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("以下為匯款資訊,請於 5 天之內完成匯款。<br />");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//銀行資訊 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: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;color: #9c9c9c;text-align: left;\"> ");
|
|
sb.Append("<table style=\"border: solid #f48800;width: 340px;\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td style=\"padding: 10px;\">");
|
|
//Bank account info
|
|
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("銀行帳戶資訊:");
|
|
sb.Append("</h1>");
|
|
//Bank name
|
|
sb.Append("<h1 style =\"padding-bottom: 6px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("銀行名稱:玉山銀行 (808) 南港分行");
|
|
sb.Append("</h1>");
|
|
//Account Number
|
|
sb.Append("<h1 style =\"padding-bottom: 6px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("帳戶號碼:1182-940-020288");
|
|
sb.Append("</h1>");
|
|
//Account Name
|
|
sb.Append("<h1 style =\"padding-bottom: 10px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("戶名:簡單平台股份有限公司");
|
|
sb.Append("</h1>");
|
|
//匯款按鈕 (連結要改)
|
|
sb.Append("<table align = \"left\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td class=\"s-btn s-btn__primary\" style=\"border-radius: 16px; background: #ee9546\">");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: left;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: left;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("上傳匯款證明單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//訂單資訊 start ------------------------------------------------------------
|
|
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;padding-bottom: 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;margin-top: 25px;\">");
|
|
//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;\" 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("<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>");
|
|
}
|
|
|
|
//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();
|
|
|
|
}
|
|
|
|
//Received Booking Mail Template 現場付款
|
|
public string PayOnsite(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
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_check-circle.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-bottom: 10px;padding-top: 10px;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("你好," + BookingOnlineModel.MemberName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:我們成功收到了你的訂單。
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;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("</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;padding-bottom: 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;margin-top: 25px;\">");
|
|
//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;\" 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: #ef5a5a;margin: 0 0 0 0;\">");
|
|
sb.Append("未付款");
|
|
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("<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>");
|
|
}
|
|
|
|
|
|
//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: 15px;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("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"width: 88px;background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
//sb.Append("前往付款");
|
|
//sb.Append("</a>");
|
|
|
|
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
//sb.Append("<tr>");
|
|
//sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
//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("<a href =\"");
|
|
//sb.Append(Server + "/api/Signup/VerifyAccount?");
|
|
//sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
//sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
//sb.Append("</a>");
|
|
//sb.Append("</p>");
|
|
//sb.Append("</td>");
|
|
//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();
|
|
|
|
}
|
|
|
|
public string GetOrderUrl(string strBookingNo) {
|
|
string strOrderUrl = "";
|
|
|
|
var Server = Common.ConfigGetValue("", "ida:WebsiteUri");
|
|
strOrderUrl = Server + "/user/booking/" + strBookingNo;
|
|
return strOrderUrl;
|
|
|
|
}
|
|
|
|
//Cancel Booking(User)
|
|
public string CancelledBooking(string Img, string LastName, string BookingStatus, string PaymentStatus, string BookingNo, string BookingItem, DateTime? BookingDate, DateTime? ServiceDateS, string CurrencyID, string TotalPrice, string ServiceName)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:你好 xxx,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
|
|
sb.Append("<h1 style = \"font-size: 16px;font-family: 'arial', 'sans-serif'; font-weight: 700;line-height: 18px; color: #000000; margin: 0 0 0 0;\">");
|
|
sb.Append("你好," + LastName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:我們正在處理您的退款
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
|
|
sb.Append("<h1 style=\"font-size: 14px;font-family: 'arial', 'sans-serif'; font-weight: 700; line-height: 18px; color: #9c9c9c;margin: 0 0 0 0;\">");
|
|
sb.Append("我們已收到您希望取消訂單的申請。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("取消訂單會依據各商品的退款規則,可能需支付退款費用。");
|
|
sb.Append("<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("若有任何問題,您可以");
|
|
sb.Append("<br />");
|
|
sb.Append("撥打 +886-2 27255000");
|
|
sb.Append("<br />");
|
|
sb.Append("發送 Email: info@showeasy.com。");
|
|
sb.Append("<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("ShowEasy 客服時間:");
|
|
sb.Append("週一至週五:9:00~18:00 (台灣時區)");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:訂單資訊
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;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;margin-top: 25px;\" src = \"/>");
|
|
sb.Append(Img);
|
|
sb.Append("\" width = '30' height = '30'");
|
|
sb.Append("</td>");
|
|
//booking status
|
|
sb.Append("<td style=\"padding-top: 25px;\">");
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #7997ff;margin: 0 0 0 0;\">");
|
|
sb.Append("取消訂單, " + PaymentStatus);
|
|
sb.Append("</h1>");
|
|
//service name
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append(ServiceName);
|
|
sb.Append("</h1>");
|
|
//booking number
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingNo);
|
|
sb.Append("</h1>");
|
|
//BookingItem
|
|
//sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
//sb.Append("接送服務, 台北市, 四人座車型 x 1");
|
|
//sb.Append("</h1>");
|
|
var lstT = new List<string>();
|
|
var objval = 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>");
|
|
}
|
|
//service time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("服務時間: " + ServiceDateS);
|
|
sb.Append("</h1>");
|
|
//booking time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("訂購時間: " + BookingDate);
|
|
sb.Append("</h1>");
|
|
//cost
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 15px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
|
|
sb.Append("$" + TotalPrice + CurrencyID);
|
|
sb.Append("</h1>");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"width: 88px;background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
sb.Append("如果按鈕無法點擊,你可以直接點擊");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
//sb.Append(mailTemplate.MailButtom());
|
|
sb.Append(mailTemplate.MailFooter());
|
|
|
|
return sb.ToString();
|
|
|
|
}
|
|
|
|
//Refunding for customer
|
|
public string Refunding(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:你好 xxx,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
|
|
sb.Append("<h1 style = \"font-size: 16px;font-family: 'arial', 'sans-serif'; font-weight: 700;line-height: 18px; color: #000000; margin: 0 0 0 0;\">");
|
|
sb.Append("你好,"+ BookingOnlineModel.MemberName+ ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:我們正在處理您的退款
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
|
|
sb.Append("<h1 style=\"font-size: 14px;font-family: 'arial', 'sans-serif'; font-weight: 700; line-height: 18px; color: #9c9c9c;margin: 0 0 0 0;\">");
|
|
sb.Append("我們正在處理您的退款,退款金額會依據各商品的退款規則退款。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("若有任何問題,您可以下兩種方式與我們聯繫:<br />");
|
|
sb.Append("撥打 +886-2 27255000 <br />");
|
|
sb.Append("發送 Email: info@showeasy.com 。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("ShowEasy 客服時間:");
|
|
sb.Append("週一至週五:9:00~18:00 (台灣時區)");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:訂單資訊
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;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;margin-top: 25px;\">");
|
|
//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;\" src = \"");
|
|
sb.Append(BookingOnlineModel.ServicePictrue);
|
|
sb.Append("\" width = '30' height = '30'/>");
|
|
sb.Append("</td>");
|
|
//booking status
|
|
sb.Append("<td style=\"padding-bottom: 30px;\">");
|
|
sb.Append("<table>");
|
|
sb.Append("<tbody>");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td style=\"padding-top: 30px;\">");
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #ef5a5a;margin: 0 0 0 0;\">");
|
|
sb.Append("取消訂單,");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("<td style=\"padding-top: 25px;\">");
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #7997ff;margin: 0 0 0 0;\">");
|
|
sb.Append(" 退款中");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
//service name
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.ServiceName);
|
|
sb.Append("</h1>");
|
|
//booking number
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.BookingNo);
|
|
sb.Append("</h1>");
|
|
//sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;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("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(item);
|
|
sb.Append("</h1>");
|
|
}
|
|
|
|
//service time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("服務時間: " + BookingOnlineModel.ServiceDateSFormat + " (當地時間)");
|
|
sb.Append("</h1>");
|
|
//booking time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("訂購時間: "+ BookingOnlineModel.BookingDateFormat);
|
|
sb.Append("</h1>");
|
|
//cost
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 15px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
|
|
sb.Append("$" + int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###") + " " + BookingOnlineModel.CurrencyName);
|
|
sb.Append("</h1>");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"width: 88px;background: #f48800;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
//sb.Append(mailTemplate.MailButtom());
|
|
sb.Append(mailTemplate.MailFooter());
|
|
|
|
return sb.ToString();
|
|
|
|
}
|
|
|
|
//Refunded for customer
|
|
public string Refunded(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:你好 xxx,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
|
|
sb.Append("<h1 style = \"font-size: 16px;font-family: 'arial', 'sans-serif'; font-weight: 700;line-height: 18px; color: #000000; margin: 0 0 0 0;\">");
|
|
sb.Append("你好," + BookingOnlineModel.MemberName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:我們正在處理您的退款
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
|
|
sb.Append("<h1 style=\"font-size: 14px;font-family: 'arial', 'sans-serif'; font-weight: 700; line-height: 18px; color: #9c9c9c;margin: 0 0 0 0;\">");
|
|
sb.Append("我們已成功退款。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("若有任何問題,您可以下兩種方式與我們聯繫:<br />");
|
|
sb.Append("撥打 +886-2 27255000 <br />");
|
|
sb.Append("發送 Email: info@showeasy.com 。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("ShowEasy 客服時間:");
|
|
sb.Append("週一至週五:9:00~18:00 (台灣時區)");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:訂單資訊
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;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-bottom: 30px;\">");
|
|
sb.Append("<table>");
|
|
sb.Append("<tbody>");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td style=\"padding-top: 30px;\">");
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #ef5a5a;margin: 0 0 0 0;\">");
|
|
sb.Append("取消訂單,");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("<td style=\"padding-top: 25px;\">");
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #757575;margin: 0 0 0 0;\">");
|
|
sb.Append(" 已退款");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
//service name
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.ServiceName);
|
|
sb.Append("</h1>");
|
|
//booking number
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.BookingNo);
|
|
sb.Append("</h1>");
|
|
//sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;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("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(item);
|
|
sb.Append("</h1>");
|
|
}
|
|
|
|
//service time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("服務時間: " + BookingOnlineModel.ServiceDateSFormat + " (當地時間)");
|
|
sb.Append("</h1>");
|
|
//booking time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("訂購時間: " + BookingOnlineModel.BookingDateFormat);
|
|
sb.Append("</h1>");
|
|
//cost
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 15px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
|
|
sb.Append("$" + int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###") + " " + BookingOnlineModel.CurrencyName);
|
|
sb.Append("</h1>");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"width: 88px;background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
//sb.Append(mailTemplate.MailButtom());
|
|
sb.Append(mailTemplate.MailFooter());
|
|
|
|
return sb.ToString();
|
|
|
|
}
|
|
|
|
//Cancel Order Notify (SE/Supplier)
|
|
public string CancelOrderNotify(string BookingNo, string ServiceName, string FirstName, string LastName, string CurrencyID, string TotalPrice, DateTime? date)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:客戶取消訂單!
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;adding-bottom: 10px;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: 30px;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("您的客戶已取消訂單,請進行確認並進行退款流程。");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//訂單編號
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 20px;padding-left: 30px;padding-right: 30px;color: #504f4f;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("訂單編號: " + BookingNo);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//商品名稱
|
|
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: #504f4f;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(ServiceName);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//客戶名稱
|
|
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: #504f4f;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("客戶名稱: " + FirstName + " " + LastName);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//訂單金額
|
|
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: #504f4f;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("訂單金額: " + CurrencyID + " " + TotalPrice);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//取消日期
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;color: #504f4f;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("取消日期" + date);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tr>");
|
|
//查看訂單按鈕
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor =\"#FEFEFE\" style =\"display: block;padding-top: 30px;font-family: arial, sans-serif;color: #232323;text-align: left;\">");
|
|
sb.Append("<table align =\"center\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td class=\"s-btn s-btn__primary\" style=\"border-radius: 16px; background: #ee9546\">");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
sb.Append("如果按鈕無法點擊,你可以直接點擊");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
//sb.Append(mailTemplate.MailButtom());
|
|
sb.Append(mailTemplate.MailFooter());
|
|
|
|
return sb.ToString();
|
|
|
|
}
|
|
|
|
//SE Cancel Order Notify To Supplier
|
|
public string SECancelOrderNotify(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:客戶取消訂單!
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;adding-bottom: 10px;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:ShowEasy 已取消此訂單,請進行確認並進行退款流程。
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;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("ShowEasy 已取消此訂單,請進行確認並進行退款流程。");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//訂單編號
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 20px;padding-left: 30px;padding-right: 30px;color: #504f4f;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("訂單編號: " + BookingOnlineModel.BookingNo);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//商品名稱
|
|
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: #504f4f;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("商品名稱: " + BookingOnlineModel.ServiceName);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//客戶名稱
|
|
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: #504f4f;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("客戶名稱: " + BookingOnlineModel.MemberName);
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//訂單金額
|
|
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: #504f4f;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("訂單金額: " + BookingOnlineModel.CurrencyID +" "+ int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###"));
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
//取消日期
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-top: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;color: #504f4f;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("取消日期: "+ Convert.ToDateTime(BookingOnlineModel.ModifyDate).ToString("yyyy/MM/dd HH:mm"));
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tr>");
|
|
//查看訂單按鈕
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor =\"#FEFEFE\" style =\"display: block;padding-top: 30px;font-family: arial, sans-serif;color: #232323;text-align: left;\">");
|
|
sb.Append("<table align =\"center\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" role = \"presentation\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td class=\"s-btn s-btn__primary\" style=\"border-radius: 16px; background: #ee9546\">");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append(" \" target=\"_parent\" style=\"background: #ee9546;border: 1px solid #ee9546;font-family: arial, sans-serif; font-size: 14px;line-height: 16px; color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px; display: block; border-radius: 16px; white-space: nowrap;\">");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 0px;padding-right: 30px;padding-top: 4px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
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();
|
|
|
|
}
|
|
|
|
//SE Cancel Order Notify To User
|
|
public string SECancelOrderNotifyToUser(View_SAL_BookingOnline BookingOnlineModel)
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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\"> ");
|
|
//Text:你好 xxx,
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"440\" style = \"display: block;padding-top: 30px;padding-left: 30px;padding-right: 30px;padding-bottom: 10px;font-family: arial, sans-serif;color: #000000;text-align: left\";>");
|
|
sb.Append("<h1 style = \"font-size: 20px;font-family: 'arial', 'sans-serif'; font-weight: 700;line-height: 20px; color: #000000; margin: 0 0 0 0;\">");
|
|
//sb.Append("你好," + "Janie" + ",");
|
|
sb.Append("你好," + BookingOnlineModel.MemberName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:我們正在處理您的退款
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"440\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;font-family: arial, sans-serif;color: #000000;text-align: left;\">");
|
|
sb.Append("<h1 style=\"font-size: 16px;font-family: 'arial', 'sans-serif'; font-weight: 700; line-height: 18px; color: #9c9c9c;margin: 0 0 0 0;\">");
|
|
sb.Append("ShowEasy 已取消您的訂單申請,若您已付款將為您進行退款流程。<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("若有任何問題,您可以");
|
|
sb.Append("<br />");
|
|
sb.Append("撥打 +886-2 27255000");
|
|
sb.Append("<br />");
|
|
sb.Append("發送 Email: info@showeasy.com。");
|
|
sb.Append("<br />");
|
|
sb.Append("<br />");
|
|
sb.Append("ShowEasy 客服時間:");
|
|
sb.Append("週一至週五:9:00~18:00 (台灣時區)");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:訂單資訊
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"440\" width = \"440px\" style = \"display: block;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=\"440px\" 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;margin-top: 25px;\" src = \"/>");
|
|
//sb.Append(Img);
|
|
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 =\"font-size: 14px;padding-bottom: 12px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #7997ff;margin: 0 0 0 0;\">");
|
|
sb.Append("取消訂單, " + BookingOnlineModel.PaymentStatus=="01"?"未付款":"已付款");
|
|
sb.Append("</h1>");
|
|
//service name
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 700;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.ServiceName);
|
|
sb.Append("</h1>");
|
|
//booking number
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(BookingOnlineModel.BookingNo);
|
|
sb.Append("</h1>");
|
|
//BookingItem
|
|
//sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;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("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append(item);
|
|
sb.Append("</h1>");
|
|
}
|
|
//service time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 4px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("服務時間: " + BookingOnlineModel.ServiceDateSFormat + " (當地時間)");
|
|
sb.Append("</h1>");
|
|
//booking time
|
|
sb.Append("<h1 style =\"font-size: 12px;padding-bottom: 8px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #504f4f;margin: 0 0 0 0;\">");
|
|
sb.Append("訂購時間: " + BookingOnlineModel.BookingDateFormat);
|
|
sb.Append("</h1>");
|
|
//cost
|
|
sb.Append("<h1 style =\"font-size: 14px;padding-bottom: 15px;font-family: 'arial','sans-serif';font-weight: 500;line-height: 18px;color: #f48800;margin: 0 0 0 0;\">");
|
|
sb.Append("$" + int.Parse(BookingOnlineModel.TotalPrice.ToString()).ToString("#,###") + " "+ BookingOnlineModel.CurrencyName);
|
|
sb.Append("</h1>");
|
|
//sb.Append("<a class=\"s-btn s-btn__primary\" href=\"https://www.showeasy.com\" target=\"_parent\" style=\"width: 88px;background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("<a class=\"s-btn s-btn__primary\" href=\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" target=\"_parent\" style=\"background: #f48800;border: 1px solid #ee9546;font-family: arial, sans-serif;font-size: 14px;line-height: 16px;color: #ffffff;text-align: center;text-decoration: none;padding: 12px 20px;display: block;border-radius: 16px;white-space: nowrap;\">");
|
|
sb.Append("查看訂單");
|
|
sb.Append("</a>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</tbody>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//如果按鈕無法點擊 (連結記得改成要打的API)
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"440\" width = \"340px\" style = \"display: block;padding-bottom: 30px;padding-top: 30px;padding-left: 30px;padding-right: 30px;color: #9c9c9c;text-align: center;\">");
|
|
sb.Append("如果按鈕無法點擊,你可以直接點擊");
|
|
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("<a href =\"");
|
|
sb.Append(GetOrderUrl(BookingOnlineModel.BookingNo));
|
|
sb.Append("\" style = \"color: #7997ff;font-size: 12px;font-weight: 400;font-family: 'Arial', '微軟正黑體','Microsoft JhengHei', 'Helvetica Neue',Helvetica, Arial, sans-serif;padding: 0;margin: 0;text-align: center;padding-left: 30px;padding-right: 30px;padding-top: 4px;padding-bottom: 30px;text-decoration: underline;\">");
|
|
sb.Append("<span align=\"center\" width=\"340\">這裡</span>");
|
|
sb.Append("</a>");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
//sb.Append(mailTemplate.MailButtom());
|
|
sb.Append(mailTemplate.MailFooter());
|
|
|
|
return sb.ToString();
|
|
|
|
}
|
|
|
|
//銀行匯款(未登入)
|
|
public string PayByTransfer_NoLogin()
|
|
{
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
EmailTemplate_CH mailTemplate = new EmailTemplate_CH();
|
|
//var Server = Common.ConfigGetValue("", "ida:RedirectUri");
|
|
|
|
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_check-circle.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-bottom: 10px;padding-top: 10px;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("你好," + BookingOnlineModel.MemberName + ",");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//Text:恭喜你!你預定的項目已被確認。
|
|
sb.Append("<tr>");
|
|
sb.Append("<td bgcolor = \"#FEFEFE\" width = \"340\" style = \"display: block;padding-left: 30px;padding-right: 30px;padding-bottom: 30px;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("以下為匯款資訊,<span style=\"color: #f48800\">完成匯款請聯繫客服告知匯款資訊</span>< br />");
|
|
sb.Append("< br />");
|
|
sb.Append("ShowEasy 客服電話與服務時間:<br />");
|
|
sb.Append("撥打 +886-2 27255000<br />");
|
|
sb.Append("發送 Email: info@showeasy.com 詢問。<br />");
|
|
sb.Append("< br />");
|
|
sb.Append("週一至週五:9:00~18:00 (台灣時區)");
|
|
sb.Append("</p>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//銀行資訊 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: 10px;padding-left: 30px;padding-right: 30px;padding-bottom: 40px;color: #9c9c9c;text-align: left;\"> ");
|
|
sb.Append("<table style=\"border: solid #f48800;width: 340px;\">");
|
|
sb.Append("<tr>");
|
|
sb.Append("<td style=\"padding: 10px;\">");
|
|
//Bank account info
|
|
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("銀行帳戶資訊:");
|
|
sb.Append("</h1>");
|
|
//Bank name
|
|
sb.Append("<h1 style =\"padding-bottom: 6px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("銀行名稱:玉山銀行 (808) 南港分行");
|
|
sb.Append("</h1>");
|
|
//Account Number
|
|
sb.Append("<h1 style =\"padding-bottom: 6px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("帳戶號碼:1182-940-020288");
|
|
sb.Append("</h1>");
|
|
//Account Name
|
|
sb.Append("<h1 style =\"padding-bottom: 10px;font-family: 'arial','sans-serif';font-weight: 500;font-size: 14px;line-height: 18px;color: #232323;margin: 0 0 0 0;\">");
|
|
sb.Append("戶名:簡單平台股份有限公司");
|
|
sb.Append("</h1>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
sb.Append("</table>");
|
|
sb.Append("</td>");
|
|
sb.Append("</tr>");
|
|
//訂單資訊 start ------------------------------------------------------------
|
|
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;padding-bottom: 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;margin-top: 25px;\">");
|
|
//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;\" 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("<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>");
|
|
//}
|
|
|
|
//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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|