示例#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();
        }