Beispiel #1
0
 private static void SaveMasterSettings(SiteSettings settings)
 {
     string masterSettingsFilename = GetMasterSettingsFilename();
     XmlDocument doc = new XmlDocument();
     if (File.Exists(masterSettingsFilename))
     {
         doc.Load(masterSettingsFilename);
     }
     settings.WriteToXml(doc);
     doc.Save(masterSettingsFilename);
 }
Beispiel #2
0
 private bool SaveSiteSettings(out string errorMsg)
 {
     errorMsg = null;
     try
     {
         string filename = base.Request.MapPath(Globals.ApplicationPath + "/config/SiteSettings.config");
         XmlDocument doc = new XmlDocument();
         SiteSettings settings = new SiteSettings(base.Request.Url.Host);
         doc.LoadXml("<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Settings></Settings>");
         settings.CheckCode = CreateKey(20);
         settings.ApplicationDescription = "<img src=\"/Storage/master/gallery/201501/20150114091939_5651.jpg\" title=\"20150114091939_5651\" alt=\"20150114091939_5651\" border=\"0\" />";
         settings.SaleService = settings.SaleService + "<div class=\"sale-service clearfix\">";
         settings.SaleService = settings.SaleService + "<a href=\"http://wpa.b.qq.com/cgi/wpa.php?ln=2&amp;uin=123456789\" class=\"col-sm-4\" target=\"_blank\">";
         settings.SaleService = settings.SaleService + "  <img src=\"/Storage/master/gallery/201501/20150112160440_7779.png\" title=\"QQ_service\" alt=\"QQ_service\" border=\"0\" /></a>   ";
         settings.SaleService = settings.SaleService + "<a href=\"http://wpa.b.qq.com/cgi/wpa.php?ln=2&amp;uin=450235251\" target=\"_blank\" class=\"col-sm-4\"><img src=\"/Storage/master/gallery/201501/20150112160517_9570.png\" title=\"QQ_service\" alt=\"QQ_service\" border=\"0\" /></a>   ";
         settings.SaleService = settings.SaleService + " <a href=\"\" http:=\"\" wpa.qq.com=\"\" msgrd?v=\"3&amp;uin=&amp;site=qq&amp;menu=yes\" \"=\"\" class=\"col-sm-4\"><img src=\"/Storage/master/gallery/201501/20150112160440_7779.png\" /></a> </div> ";
         settings.SaleService = settings.SaleService + "<a type=\"button\" class=\"btn btn-danger btn-block\" href=\"tel:18211111111\">服务电话:18211111111</a>";
         settings.DistributorBackgroundPic = "/Storage/data/DistributorBackgroundPic/default.jpg|";
         settings.MentionNowMoney = "1";
         settings.DistributorDescription = settings.DistributorDescription + "<p>微信分销的功课:</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>1.研究兴趣取向:通过观察和研究他们发布的朋友圈,了解他们可能会被我们产品的那一方面打动,整合我们产品的特点,激发他们的兴趣。&nbsp;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>2.推送信息:根据他们的兴趣特点来发布信息;字数不宜超过20字;要留悬念,让他们主动发问;图文并茂;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>3.每天不要超过三条,更不要同时发送,选择的热度时间不同微信不一样,方法是观察朋友圈在哪段时间大家发微信比较勤奋,比他们的时间早5分钟左右发布。</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p><span style=\"line-height:1.5;\">4.因为一般人的习惯是先看后发。最初,要学会烘托气氛,当我们开始做朋友圈营销的时候,一定不能做的像一个新手一样,发图片,然后写一些介绍。</span></p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>微信分销的五要点&nbsp;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>第一建立一个信任度;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>第二呢第一时间让对方感兴趣;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>第三点呢就是顾客的二次营销;&nbsp;</p>";
         settings.DistributorDescription = settings.DistributorDescription + "<p>第四点呢互动;";
         settings.DistributorDescription = settings.DistributorDescription + "第五个呢老顾客的忠诚和信息的推广;</p>";
         settings.OpenManyService = false;
         settings.WriteToXml(doc);
         doc.Save(filename);
         return true;
     }
     catch (Exception exception)
     {
         errorMsg = exception.Message;
         return false;
     }
 }