//double click on category row and opens details form private void categoryClick(object sender, EventArgs e) { categoryEdit editCategoryForm = new categoryEdit(CategoryManager.getCategoryById(loggedUser.email, loggedUser.password, int.Parse(categoryListView.SelectedItems[0].SubItems[0].Text)), this); editCategoryForm.Show(); }
//create category button private void createCategory_Click(object sender, EventArgs e) { Category.Category newCategory = new Category.Category(); newCategory.ID = 0; newCategory.name = ""; categoryEdit editCategoryForm = new categoryEdit(newCategory, this); editCategoryForm.Show(); }