private void MainFr_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'foodListDataSet.Food_List' table. You can move, or remove it, as needed. this.food_ListTableAdapter.Fill(this.foodListDataSet.Food_List); addMyFood = new frmAddFood(); temp = new PantryFr(); addMyFood = new frmAddFood(); Fridge = new frmFridge(); FridgePantry = new frmFridgePantry(); RecipesPage = new frmRecipes(); try { this.food_ListTableAdapter.FillBy(this.foodListDataSet.Food_List); } catch { } int rowCount = int.Parse(this.foodListDataSet.Tables["Food List"].Rows.Count.ToString()); for (int i = 0; i < rowCount; i++) { lboxExpiring.Items.Add(this.foodListDataSet.Tables["Food List"].Rows[i]["Item Name"].ToString() + " - " + this.foodListDataSet.Tables["Food List"].Rows[i]["Expiration Date"].ToString().Remove(10)); } }
private void frmFridgePantry_Load(object sender, EventArgs e) { lboxFridgePantry.Items.Clear(); // TODO: This line of code loads data into the 'foodListDataSet.Food_List' table. You can move, or remove it, as needed. this.food_ListTableAdapter.Fill(this.foodListDataSet.Food_List); addMyFood = new frmAddFood(); fillListBox(); }