private static string ProcessEmailMessage(long tranId) { string template = EmailTemplateHelper.GetTemplateFileContents("/Static/Templates/Email/Sales/Delivery.html"); List<object> dictionary = new List<object> { AppUsers.GetCurrent().View, Data.Transactions.Delivery.GetSalesDeliveryView(AppUsers.GetCurrentUserDB(), tranId) }; var processor = new EmailTemplateProcessor(template, dictionary); template = processor.Process(); return template; }
private static string ProcessEmailMessage(long tranId, string token) { string template = EmailTemplateHelper.GetTemplateFileContents("/Static/Templates/Email/Sales/Quotation.html"); string link = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + "/Public/ApproveQuotation.aspx?ValidationId=" + token; template = template.Replace("{QuotationAcceptLink}", link); List<object> dictionary = new List<object> { AppUsers.GetCurrent().View, Data.Transactions.Quotation.GetSalesQuotationView(AppUsers.GetCurrentUserDB(), tranId) }; EmailTemplateProcessor processor = new EmailTemplateProcessor(template, dictionary); template = processor.Process(); return template; }