Beispiel #1
0
        //Ingredient
        private void btnAddIng_Click(object sender, EventArgs e)
        {
            var newForm = new AddIngredientForm(new AddIngredientForm.Del(AddIngredient));

            newForm.Owner = this;
            newForm.ShowDialog();
        }
Beispiel #2
0
        private void btnEditIng_Click(object sender, EventArgs e)
        {
            if (ingredientsGrid.Rows.Count == 0)
            {
                return;
            }

            var newForm = new AddIngredientForm(new AddIngredientForm.Del(EditIngredient),
                                                (Ingredient)ingredientsGrid.CurrentRow.Cells[0].Value);

            newForm.Owner = this;
            newForm.ShowDialog();
        }