private void AddRioGrandeSpreadsheet_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.DefaultExt = ".xls"; openFileDialog.Filter = "Excel Files *.xls | *.xls"; if (openFileDialog.ShowDialog() != DialogResult.OK) { return; } var dlg = new Forms.ImportForms.AddRioGrandeSpreadsheet(); if (dlg.ShowDialog() == DialogResult.OK) { var s = ImportMultiSheetDailySeriesExcel.ImportSpreadsheet(openFileDialog.FileName); s.Name = dlg.SeriesName; s.Units = dlg.Units; DB.AddSeries(s); } }
private void AddRioGrandeSpreadsheet_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.DefaultExt = ".xls"; openFileDialog.Filter = "Excel Files *.xls | *.xls"; if (openFileDialog.ShowDialog() != DialogResult.OK) return; var dlg = new Forms.ImportForms.AddRioGrandeSpreadsheet(); if( dlg.ShowDialog() == DialogResult.OK) { var s = ImportMultiSheetDailySeriesExcel.ImportSpreadsheet(openFileDialog.FileName); s.Name = dlg.SeriesName; s.Units = dlg.Units; DB.AddSeries(s); } }