private void button5_Click(object sender, EventArgs e) { DbHelper dbh = new DbHelper(); PicksDB pdb = new PicksDB(); DataTable dt = pdb.getPicks(); foreach (DataRow r in dt.Rows) { if (dbh.savePicks(r["Entrant"].ToString(), r["Golfer"].ToString()) == 0) { MessageBox.Show("Error Entering " + r["Entrant"].ToString() + " " + r["Golfer"].ToString()); } } }
public void InitialEntrantsAddToDB() { DbHelper dbh = new DbHelper(); PicksDB pdb = new PicksDB(); foreach (DataRow p in pdb.getPicks().Rows) { dbh.saveEntrant(p["Entrant"].ToString()); } }
public void InitialPicksAddToDB() { DbHelper dbh = new DbHelper(); PicksDB pdb = new PicksDB(); foreach (DataRow p in pdb.getPicks().Rows) { if (dbh.savePicks(p["entrant"].ToString(), p["golfer"].ToString()) == 0) { System.Console.WriteLine("Error"); } } }