Ejemplo n.º 1
0
        /// <summary>
        /// Export data to outgoing directory
        /// </summary>
        /// <param name="importTag"></param>
        /// <param name="routingList"></param>
        private void Export(string importTag, SeriesList routingList)
        {
            SeriesList instantRoute = new SeriesList();
            SeriesList dailyRoute   = new SeriesList();

            // route data to other locations.
            foreach (var item in routingList)
            {
                TimeSeriesName tn = new TimeSeriesName(item.Table.TableName);
                item.Parameter = tn.pcode;
                item.SiteID    = tn.siteid;
                if (item.TimeInterval == TimeInterval.Irregular)
                {
                    instantRoute.Add(item);
                }
                if (item.TimeInterval == TimeInterval.Daily)
                {
                    dailyRoute.Add(item);
                }
            }
            Logger.WriteLine("Exporting data");
            TimeSeriesTransfer export = new TimeSeriesTransfer(m_db);

            export.Export(instantRoute, importTag, TimeInterval.Irregular);
            export.Export(dailyRoute, importTag, TimeInterval.Daily);
        }