本文整理汇总了C#中Nevoweb.DNN.NBrightBuy.Components.NBrightBuyController.GetStoreSettings方法的典型用法代码示例。如果您正苦于以下问题:C# NBrightBuyController.GetStoreSettings方法的具体用法?C# NBrightBuyController.GetStoreSettings怎么用?C# NBrightBuyController.GetStoreSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nevoweb.DNN.NBrightBuy.Components.NBrightBuyController
的用法示例。
在下文中一共展示了NBrightBuyController.GetStoreSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendEmail
public static void SendEmail(String toEmail, String templateName, NBrightInfo dataObj, String emailsubjectresxkey, String fromEmail,String lang)
{
dataObj = ProcessEventProvider(EventActions.BeforeSendEmail, dataObj, templateName);
if (!dataObj.GetXmlPropertyBool("genxml/stopprocess"))
{
if (lang == "") lang = Utils.GetCurrentCulture();
var emaillist = toEmail;
if (emaillist != "")
{
var emailsubject = "";
if (emailsubjectresxkey != "")
{
var resxpath = StoreSettings.NBrightBuyPath() + "/App_LocalResources/Notification.ascx.resx";
emailsubject = DnnUtils.GetLocalizedString(emailsubjectresxkey, resxpath, lang);
if (emailsubject == null) emailsubject = emailsubjectresxkey;
}
// we can't use StoreSettings.Current.Settings(), becuase of external calls from providers to this function, so load in the settings directly
var modCtrl = new NBrightBuyController();
var storeSettings = modCtrl.GetStoreSettings(dataObj.PortalId);
var strTempl = modCtrl.GetTemplateData(-1, templateName, lang, storeSettings.Settings(), storeSettings.DebugMode);
var emailbody = GenXmlFunctions.RenderRepeater(dataObj, strTempl, "", "XMLData", lang, storeSettings.Settings());
if (templateName.EndsWith(".xsl")) emailbody = XslUtils.XslTransInMemory(dataObj.XMLData, emailbody);
if (fromEmail == "") fromEmail = storeSettings.AdminEmail;
var emailarray = emaillist.Split(',');
emailsubject = storeSettings.Get("storename") + " : " + emailsubject;
foreach (var email in emailarray)
{
if (!string.IsNullOrEmpty(email.Trim()) && Utils.IsEmail(fromEmail.Trim()) && Utils.IsEmail(email.Trim()))
{
// multiple attachments as csv with "|" seperator
DotNetNuke.Services.Mail.Mail.SendMail(fromEmail.Trim(), email.Trim(), "", emailsubject, emailbody, dataObj.GetXmlProperty("genxml/emailattachment"), "HTML", "", "", "", "");
}
}
}
}
ProcessEventProvider(EventActions.AfterSendEmail, dataObj, templateName);
}