예제 #1
0
 //starts when import is clicked with 2 excel files entered
 public void ImportCSV(string masterDataFilepath, string routeNumberFilepath)
 {
     //delete all data in database when import is clicked and create space for new data
     using (FynbusBackupModel db = new FynbusBackupModel())
     {
         db.Database.ExecuteSqlCommand("truncate TABLE Offerstable");
         db.Database.ExecuteSqlCommand("truncate TABLE Contractorstable");
         db.Database.ExecuteSqlCommand("truncate TABLE RouteNumberstable");
     }
     //starts the import with excel file to database
     iOController.InitializeImport(masterDataFilepath, routeNumberFilepath);
 }
예제 #2
0
 /// <summary>
 /// Calls the IOController to handle the importing of data from the two selected files.
 /// </summary>
 public void ImportCSV(string masterDataFilepath, string routeNumberFilepath)
 {
     iOController.InitializeImport(masterDataFilepath, routeNumberFilepath);
 }