private void MenuItem_Click(object sender, RoutedEventArgs e) { IDSImporter importer = new StandardImport_Exl(); if (importer.Import(null) != null) { System.Windows.MessageBox.Show("Standard import succeeded"); } }
void LoadStandard() { try { IDSImporter importer = new StandardImport_Exl(); LYTunnelStandard = importer.Import("LYTunnel"); } catch (Exception e) { MessageBox.Show(e.Message); } }
private void LoadStandard(string StandardName) { StandardName = StandardName ?? "Geology"; IDSImporter importer = new StandardImport_Exl(); if (importer.Import(StandardName) != null) { StandardLoader standardLoader = new StandardLoader(); Standard = standardLoader.GetStandard(StandardName); System.Windows.MessageBox.Show(StandardName + " Standard imported succeessfully"); filter = standardLoader.CreateFilter(); ReloadWindow(); } }
/// <summary> /// load Data /// </summary> public void Load() { IDSImporter importer = new StandardImport_Exl(); if (importer.Import("Geology") != null) { System.Windows.MessageBox.Show("Standard import succeeded"); } StandardLoader standardLoader = new StandardLoader(); Standard = standardLoader.GetStandard(); filter = standardLoader.CreateFilter(); TunnelTypeCB.ItemsSource = filter.Tunnels; TunnelTypeCB.SelectedIndex = 0; ShowEmptyData(); //ClassGenerator generator = new ClassGenerator(); //generator.GenerateClass(Standard); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { //step1: find the aim object def string aimDGObjectType = "Borehole"; //load standard IDSImporter importer = new StandardImport_Exl(); DataStandardDef standard = importer.Import(null); //StandardLoader loader = new StandardLoader(); //DataStandardDef standard = loader.getStandard(null); // excel templete for data input IDataExporter dexporter = new DataExporter_Excel(); dexporter.Export(standard); //generate data model according standard(write cs file ,need to be added manually) //ClassGenerator classGenerator = new ClassGenerator(); //classGenerator.GenerateClass(standard); ////IDSExporter dsexporter = new Exporter_For_JSON();//export data standard //DGObjectDef aimDGObjectDef = standard.getDGObjectDefByCode(aimDGObjectType); //Import Data from excel IDataImporter dimporter = new DataImporter_Excel(); string path = @"C:\Users\litao\Desktop\Geology.xls"; DataSet ds = dimporter.Import(path, standard); DataChecker checker = new DataChecker(ds, standard); checker.Check(); //store data to database IDataBaseManager dataManager = new DataBaseManager_EF(); dataManager.Data2DB(ds, standard); //step8 : exporter the data }