Esempio n. 1
0
 public TimeSeriesDatabaseUtility(TimeSeriesDatabase db)
 {
     m_db            = db;
     m_seriesCatalog = m_db.GetSeriesCatalog();
     m_siteCatalog   = m_db.GetSiteCatalog();
 }
Esempio n. 2
0
 public TimeSeriesDatabaseDataSet.sitecatalogDataTable GetSiteCatalog()
 {
     var tbl = new TimeSeriesDatabaseDataSet.sitecatalogDataTable();
     m_server.FillTable(tbl, "select * from sitecatalog order by siteid");
     return tbl;
 }
Esempio n. 3
0
 public TimeSeriesDatabaseDataSet.sitecatalogDataTable GetSiteCatalog(string filter="1=1", string propertyFilter="")
 {
     var tbl = new TimeSeriesDatabaseDataSet.sitecatalogDataTable();
     string sql = "select * from sitecatalog where " + filter;
     sql += GetSitePropertySQL(propertyFilter);
     sql += "  order by  siteid";
     m_server.FillTable(tbl, sql);
     return tbl;
 }
Esempio n. 4
0
        internal TimeSeriesDatabaseDataSet.sitecatalogRow GetSiteRow(string siteID)
        {
            Logger.WriteLine("GetSiteRow('"+siteID+"')");
            string sql = "Select * from sitecatalog where lower(siteid) = '" + siteID.ToLower() + "'";
            var tbl = new TimeSeriesDatabaseDataSet.sitecatalogDataTable();
            m_server.FillTable(tbl, sql);
            if (tbl.Rows.Count == 0)
            {
                Logger.WriteLine("Error: GetSiteRow() Could not find site with ID = '" + siteID + "'");
                return null;
            }
            var rval = tbl[0];

            return rval;
        }