private void sqliteMysql_Click(object sender, EventArgs e) { var sqlite = new TaxesEntities(); var mysql = new MySQLContext(); if (this.OutputDir == null) { MessageBox.Show(@"Select output directory first"); return; } try { var export = new SQLiteMySQLExport(mysql, sqlite); export.exportXLSX(this.OutputDir); MessageBox.Show(@"Reports are succesfully exported in " + this.OutputDir); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public MssqlToMysql(MySQLContext mysql, SalesSystemContext mssql) { this.mssql = mssql; this.mysql = mysql; }
// Problem 7 private void mssqlToMysql_Click(object sender, EventArgs e) { try { var mssql = new SalesSystem.Data.SalesSystemContext(); var mysql = new MySQLContext(); var problem7 = new MssqlToMysql(mysql, mssql); problem7.Transferdata(); MessageBox.Show(@"Done"); } catch (Exception ex) { MessageBox.Show(ex.StackTrace); } }
public SQLiteMySQLExport(MySQLContext mysqlContext, TaxesEntities sqliteCotext) { this.mySql = mysqlContext; this.sqlite = sqliteCotext; }