예제 #1
0
        private void btnAddCategory_Click(object sender, EventArgs e)
        {
            var form = new AddCategoryForm();

            if (form.ShowDialog() != DialogResult.Ignore)
            {
                LoadGrid();
            }
        }
예제 #2
0
        private void toolStripNewCategory_Click(object sender, System.EventArgs e)
        {
            var form = new AddCategoryForm();

            if (form.ShowDialog() != DialogResult.Ignore)
            {
                LoadGrid();
            }
        }
예제 #3
0
        private void toolStripEditCategory_Click(object sender, System.EventArgs e)
        {
            if (_currentCategory == null)
            {
                return;
            }

            var form = new AddCategoryForm(_currentCategory);

            if (form.ShowDialog() != DialogResult.Ignore)
            {
                LoadGrid();
            }
        }
예제 #4
0
        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();
            }
        }