Bad Victory
❔ Can someone help me with the buttons?
private void AddRecipe()
{
// Get the properties from currRecipe for example "Name"
currRecipe.Name = txtBoxRecipeName.Text;
// Do similar for other properties Description and FoodCategory from currRecipe.
currRecipe.Description = txtBoxDescription.Text;
currRecipe.FoodCategory = (FoodCategory)Enum.Parse(typeof(FoodCategory), cmbBoxCategory.Text);
// Check if txtBoxRecipeName is not null
if (txtBoxRecipeName != null)
{
// Call the method AddRecipe from recipeManager to add currRecipe
recipeManager.AddRecipe(currRecipe);
}
}
267 replies