Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }