当前位置: 首页>>代码示例>>C#>>正文


C# NBrightBuyController.GetStoreSettings方法代码示例

本文整理汇总了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);
        }
开发者ID:fujinguyen,项目名称:NBrightBuy,代码行数:43,代码来源:NBrightBuyUtils.cs


注:本文中的Nevoweb.DNN.NBrightBuy.Components.NBrightBuyController.GetStoreSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。