Пример #1
0
        //Ingredient
        private void btnAddRec_Click(object sender, EventArgs e)
        {
            var newForm = new AddRecipeForm(new AddRecipeForm.Del(AddRecipe));

            newForm.Owner = this;
            newForm.ShowDialog();
        }
Пример #2
0
        private void btnEditRec_Click(object sender, EventArgs e)
        {
            if (recipesGrid.Rows.Count == 0)
            {
                return;
            }

            var newForm = new AddRecipeForm(new AddRecipeForm.Del(EditRecipe),
                                            (Recipe)recipesGrid.CurrentRow.Cells[1].Value);

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