private void setupCategoryToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); CategoryUI aCategoryUi = new CategoryUI(userNameLabel.Text); aCategoryUi.Show(); }
private void updateCategoryButton_Click(object sender, EventArgs e) { Category category = new Category(); if (categoryTextBox.Text == String.Empty) { MessageBox.Show("Please enter a category"); } else { category.Name = categoryTextBox.Text; category.Id = id; string message = aCategoryManager.UpdateCategory(category); MessageBox.Show(message); this.Hide(); CategoryUI aCategoryUi = new CategoryUI(userNameLabel.Text); aCategoryUi.Show(); } }