Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddRecipesForm form = new AddRecipesForm();

            form.RecipesID = 0;
            var result = form.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                recipesTableAdapter.Fill(farmManageDataSet.Recipes);
            }
        }
Esempio n. 2
0
        private void dgvRecipse_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            var form = new AddRecipesForm();

            form.RecipesID = Convert.ToInt32(((DataRowView)recipesBindingSource[e.RowIndex]).Row[0]);
            var result = form.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                recipesTableAdapter.Fill(farmManageDataSet.Recipes);
            }
        }