public DBclass(bool isUpdateThread) { connection = new MySqlConnection(tposDesktop.Properties.Settings.Default.testConnectionString); if (DS == null) { DS = new DataSetTpos(); } if (isUpdateThread) { updateThread = new UpdateThreading(); } }
//public DBclass() //{ // connection = new MySqlConnection("server=localhost;user id=foodsDB_user;password=D@faul(t);database=foods;persistsecurityinfo=True"); // string[] tables = { "employee", "dishes", "halfstaff", "products" }; // if (DS == null) // DS = new DataSet(); // foreach(string tableName in tables) // Fill(tableName); //} //string conStr = "server=localhost;user id=root;database=test;";//"server=localhost;user id=foodsDB_user;password=D@faul(t);database=foods;persistsecurityinfo=True"; public DBclass(string[] tables) { connection = new MySqlConnection(tposDesktop.Properties.Settings.Default.testConnectionString); if (DS == null) { DS = new DataSetTpos(); } foreach (string table in tables) { Fill(table); } updateThread = new UpdateThreading(); }