예제 #1
0
 /// <summary>
 /// Автоматично зареждане на новини
 /// </summary>
 private static void AutoRun_RSSFeeds(TextWriter aLogFile, string aApplPath, string aConnectionString)
 {
     aLogFile.WriteLine(DateTime.Now.ToString("yyyy.MM.dd HH:mm") + " RSSFeeds");
     aLogFile.Flush();
     using (UCRSSFeeds ucRSSFeeds = new UCRSSFeeds())
     {
         ucRSSFeeds.ConnectionString = aConnectionString;
         ucRSSFeeds.LogFile          = aLogFile;
         ucRSSFeeds.LoadNews();
     }
     aLogFile.WriteLine(DateTime.Now.ToString("yyyy.MM.dd HH:mm") + " UpdateData");
     aLogFile.Flush();
     using (UCUpdateData ucUpdateData = new UCUpdateData())
     {
         ucUpdateData.ConnectionString = aConnectionString;
         ucUpdateData.LogFile          = aLogFile;
         ucUpdateData.ApplPath         = aApplPath;
         ucUpdateData.UpdateData();
     }
 }
예제 #2
0
 /// <summary>
 /// Автоматично зареждане на новини
 /// </summary>
 private static void AutoRun_RSSFeeds(TextWriter aLogFile, string aApplPath, string aConnectionString)
 {
     aLogFile.WriteLine(DateTime.Now.ToString("yyyy.MM.dd HH:mm") + " RSSFeeds");
     aLogFile.Flush();
     using (UCRSSFeeds ucRSSFeeds = new UCRSSFeeds())
     {
         ucRSSFeeds.ConnectionString = aConnectionString;
         ucRSSFeeds.LogFile = aLogFile;
         ucRSSFeeds.LoadNews();
     }
     aLogFile.WriteLine(DateTime.Now.ToString("yyyy.MM.dd HH:mm") + " UpdateData");
     aLogFile.Flush();
     using (UCUpdateData ucUpdateData = new UCUpdateData())
     {
         ucUpdateData.ConnectionString = aConnectionString;
         ucUpdateData.LogFile = aLogFile;
         ucUpdateData.ApplPath = aApplPath;
         ucUpdateData.UpdateData();
     }
 }