Example #1
0
 public void Basic()
 {
     string fn = Path.Combine(TestData.DataPath, "RiverWare");
     fn = Path.Combine(fn, "20120403_SHARP_MRM_Forecast-Mar-50pct.xlsx");
     UrgwomSeries s = new UrgwomSeries(fn, "Run0","Heron.Storage");
     s.Read();
 }
Example #2
0
 public override Series CreateScenario(TimeSeriesDatabaseDataSet.ScenarioRow scenario)
 {
     var s = new UrgwomSeries(ConnectionStringUtility.GetFileName(scenario.Path, m_db.DataSource),
         ConnectionStringUtility.GetToken(scenario.Path, "SheetName", ""),
         valueColumn);
     s.ScenarioName = scenario.Name;
     s.Name = "";
     s.Appearance.LegendText = scenario.Name;
     return s;
 }
Example #3
0
        public override Series CreateBaseline()
        {
            var fn = ConfigurationManager.AppSettings["UrgwomBaseLine"].ToString();
              var dir = Path.GetDirectoryName(xlsFilename);
              fn =  Path.Combine(dir, fn);

              var s = new UrgwomSeries(fn,"Run0",valueColumn);
              s.ScenarioName = "baseline";
              s.Appearance.LegendText = "baseline";
              return s;
        }
Example #4
0
        public override Series CreateScenario(TimeSeriesDatabaseDataSet.ScenarioRow scenario)
        {
            var s = new UrgwomSeries(ConnectionStringUtility.GetFileName(scenario.Path, m_db.DataSource),
                                     ConnectionStringUtility.GetToken(scenario.Path, "SheetName", ""),
                                     valueColumn);

            s.ScenarioName          = scenario.Name;
            s.Name                  = "";
            s.Appearance.LegendText = scenario.Name;
            return(s);
        }
Example #5
0
        public override Series CreateBaseline()
        {
            var fn  = ConfigurationManager.AppSettings["UrgwomBaseLine"].ToString();
            var dir = Path.GetDirectoryName(xlsFilename);

            fn = Path.Combine(dir, fn);

            var s = new UrgwomSeries(fn, "Run0", valueColumn);

            s.ScenarioName          = "baseline";
            s.Appearance.LegendText = "baseline";
            return(s);
        }
Example #6
0
        public void LoadTree()
        {
            m_db.SuspendTreeUpdates();
            var colNames = xls.ColumnNames("Run0");
            var sc       = m_db.GetSeriesCatalog();

            var root = m_db.AddFolder("URGWOM");
            var sr   = m_db.GetNewSeriesRow();
            int id   = sr.id;

            foreach (var item in colNames)
            {
                Series s = new UrgwomSeries(excelFilename, "Run0", item);
                s.ConnectionString = ConnectionStringUtility.MakeFileNameRelative(s.ConnectionString, m_db.DataSource);
                s.Name             = item;
                s.Parameter        = item;
                sc.AddSeriesCatalogRow(s, id, root.ID, "");
                id++;
            }

            m_db.Server.SaveTable(sc);
            m_db.ResumeTreeUpdates();
        }