Exemplo n.º 1
0
 public DBclass()
 {
     connection = new MySqlConnection(tposDesktop.Properties.Settings.Default.testConnectionString);
     if (DS == null)
     {
         DS = new DataSetTpos();
     }
     //updateThread = new UpdateThreading();
 }
Exemplo n.º 2
0
        //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();
        }