private void btnAddNewFoods2_Click(object sender, EventArgs e) { AddNewFood addFood = AddNewFood.getInstance(); this.Hide(); addFood.Show(); }
public static AddNewFood getInstance() { if (uniqueInstance == null) { uniqueInstance = new AddNewFood(); } return(uniqueInstance); }
private void btnEditfoodCard_Click(object sender, EventArgs e) { //getting the card id String cardId = this.cardId; AddNewFood addNwFood = AddNewFood.getInstance(); addNwFood.editcategory(cardId); addNwFood.Show(); this.Hide(); }