private void Button_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog();
       if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
       {
     tbFileName.Text = ofd.FileName;
     using (GenericParserAdapter parser = new GenericParserAdapter(tbFileName.Text))
     {
       parser.Load("prediction-format.xml");
       System.Data.DataSet dsResult = parser.GetDataSet();
       DisplayData = dsResult.Tables[0];
       PopulateFromAndTo();
     }
       }
 }
Example #2
0
 private DataView LoadCSVDataTables(String rootPath, String dataFolder)
 {
     FileInfo[] visitFiles = LoadFiles(rootPath, dataFolder);
     DataView dataView = new DataView();
     foreach (FileInfo fi in visitFiles)
     {
         System.Data.DataSet dsResult;
         using (GenericParserAdapter parser = new GenericParserAdapter(fi.FullName))
         {
             parser.Load("VisitStatusFormat.xml");
             dsResult = parser.GetDataSet();
         }
         if (VisitDataView.Count == 0)
             dataView = dsResult.Tables[0].AsDataView();
         else
             dataView.Table.Merge(dsResult.Tables[0]);
     }
     return dataView;
 }