} // SaveStats private void SaveStats(IEnumerable <StatsModel> oStats, string sDescription) { Log.Debug("Saving {1} stats for {0} started...", ReportDateStr, sDescription); var sp = new InsertOrUpdateSiteAnalytics(DB, Log); foreach (StatsModel stat in oStats) { var oRow = new InsertOrUpdateSiteAnalytics.InputRow(m_oReportDate, stat); if (oRow.IsValid(Log, Severity.Debug)) { sp.lst.Add(oRow); } } // for each stat to save if (sp.AreParametersValid(Severity.Debug)) { sp.ExecuteNonQuery(); } Log.Debug("Saving {1} stats for {0} complete.", ReportDateStr, sDescription); } // SaveStats
} // UpdateCurrentReportDate private void SaveStats(SortedDictionary <string, int> oStats, string sDescription) { Log.Debug("Saving {1} stats for {0} started...", ReportDateStr, sDescription); var sp = new InsertOrUpdateSiteAnalytics(DB, Log); foreach (KeyValuePair <string, int> pair in oStats) { var oRow = new InsertOrUpdateSiteAnalytics.InputRow(m_oReportDate, pair.Key, pair.Value); if (oRow.IsValid(Log, Severity.Debug)) { sp.lst.Add(oRow); } } // for each stat to save if (sp.AreParametersValid(Severity.Debug)) { sp.ExecuteNonQuery(); } Log.Debug("Saving {1} stats for {0} complete.", ReportDateStr, sDescription); } // SaveStats