예제 #1
0
파일: OwrdSeries.cs 프로젝트: woohn/Pisces
        public OwrdSeries(TimeSeriesDatabase db, TimeSeriesDatabaseDataSet.SeriesCatalogRow sr) : base(db, sr)
        {
            var str_dataset = ConnectionStringUtility.GetToken(this.ConnectionString, "DataSet", "MDF");

            dataset = (OwrdDataSet)System.Enum.Parse(typeof(OwrdDataSet), str_dataset);
            m_includeProvisional = ConnectionStringUtility.GetBoolean(this.ConnectionString, "Provisional", false);
            station_nbr          = ConnectionStringUtility.GetToken(this.ConnectionString, "StationNumber", "");
        }
예제 #2
0
        //public static SpreadsheetGearSeries ReadFromConnectionString(string connectionString,
        //    string dataPath)
        //{
        //    SpreadsheetGearSeries rval = CreateFromConnectionString(connectionString, dataPath);
        //    rval.Read();
        //    return rval;
        //}



        public static SpreadsheetGearSeries CreateFromConnectionString(string connectionString,
                                                                       string dataPath)
        {
            string fileName = ConnectionStringUtility.GetToken(connectionString, "FileName", "");

            if (!Path.IsPathRooted(fileName))
            {
                fileName = Path.Combine(dataPath, fileName);
            }
            SpreadsheetGearSeries rval = new SpreadsheetGearSeries(
                fileName,
                ConnectionStringUtility.GetToken(connectionString, "SheetName", ""),
                ConnectionStringUtility.GetToken(connectionString, "DateColumn", ""),
                ConnectionStringUtility.GetToken(connectionString, "ValueColumn", ""),
                ConnectionStringUtility.GetBoolean(connectionString, "IsWaterYearFormat", false),
                ConnectionStringUtility.GetToken(connectionString, "SiteColumn", ""),
                ConnectionStringUtility.GetToken(connectionString, "SiteFilter", "")
                );

            return(rval);
        }