Exemple #1
0
        public static ValuesDataSet GetValuesDataSet(int? siteID, int? VariableID)
        {
            ValuesDataSet ds = basicValuesDataSet();
            if (!siteID.HasValue || !VariableID.HasValue) return ds;
            ValuesDataSetTableAdapters.DataValuesTableAdapter valuesTableAdapter = new DataValuesTableAdapter();
            valuesTableAdapter.Connection.ConnectionString = Config.ODDB();

            valuesTableAdapter.FillBySiteIDVariableID(ds.DataValues, siteID.Value, VariableID.Value);

            return ds;
        }
Exemple #2
0
        public static ValuesDataSet GetValuesDataSet(int? siteID, int? VariableID, W3CDateTime BeginDateTime, W3CDateTime EndDateTime)
        {
            ValuesDataSet ds = basicValuesDataSet();
            if (!siteID.HasValue || !VariableID.HasValue) return ds;
            ValuesDataSetTableAdapters.DataValuesTableAdapter valuesTableAdapter = new DataValuesTableAdapter();
            valuesTableAdapter.Connection.ConnectionString = Config.ODDB();

            valuesTableAdapter.FillBySiteIdVariableIDBetweenDates(ds.DataValues, siteID.Value, VariableID.Value, BeginDateTime.DateTime, EndDateTime.DateTime);

            return ds;
        }
Exemple #3
0
        public static ValuesDataSet GetValuesDataSet(int siteID)
        {
            ValuesDataSet ds = basicValuesDataSet();

            ValuesDataSetTableAdapters.DataValuesTableAdapter valuesTableAdapter = new DataValuesTableAdapter();
            valuesTableAdapter.Connection.ConnectionString = Config.ODDB();

            try
            {
                valuesTableAdapter.FillBySiteID(ds.DataValues, siteID);
            }
            catch (Exception e)
            {
                log.Fatal("Cannot retrieve information from database: " + e.Message); //+ valuesTableAdapter.Connection.DataSource
            }

            return ds;
        }