private void btnAddFood_Click(object sender, EventArgs e) { var dialog = new UpdateFoodForm(); if (dialog.ShowDialog(this) == DialogResult.OK) { ShowFoodsForNode(tvwCategory.SelectedNode); } }
private void lvwFood_DoubleClick(object sender, EventArgs e) { if (lvwFood.SelectedItems.Count == 0) { return; } var foodID = int.Parse(lvwFood.SelectedItems[0].Text); var dialog = new UpdateFoodForm(foodID); if (dialog.ShowDialog(this) == DialogResult.OK) { ShowFoodsForNode(tvwCategory.SelectedNode); } }