private void btnAddCategory_Click(object sender, EventArgs e) { var form = new AddCategoryForm(); if (form.ShowDialog() != DialogResult.Ignore) { LoadGrid(); } }
private void toolStripNewCategory_Click(object sender, System.EventArgs e) { var form = new AddCategoryForm(); if (form.ShowDialog() != DialogResult.Ignore) { LoadGrid(); } }
private void toolStripEditCategory_Click(object sender, System.EventArgs e) { if (_currentCategory == null) { return; } var form = new AddCategoryForm(_currentCategory); if (form.ShowDialog() != DialogResult.Ignore) { LoadGrid(); } }
private void btnEditCategory_Click(object sender, EventArgs e) { if (gridCategories.SelectedRows.Count != 0) { _currentCategory = gridCategories.SelectedRows[0].Tag as Category; } else { return; } if (_currentCategory == null) { return; } var form = new AddCategoryForm(_currentCategory); if (form.ShowDialog() != DialogResult.Ignore) { LoadGrid(); } }