private void btnAddCategory_Click(object sender, EventArgs e) { if (txtAddCategoryDescription.Text != "" && txtAddCategoryName.Text != "") { if (!cda.AddItem(new Category() { CategoryDescription = txtAddCategoryDescription.Text, Name = txtAddCategoryName.Text })) { lblManageCategoryAlertSuccessfull.Visible = false; lblManageCategoryAlertFail.Visible = true; lblManageCategoryAlertFail.BringToFront(); UpdateCategoryList(); } else { lblManageCategoryAlertFail.Visible = false; lblManageCategoryAlertSuccessfull.Visible = true; lblManageCategoryAlertSuccessfull.BringToFront(); } } else { lblManageCategoryAlertSuccessfull.Visible = false; lblManageCategoryAlertFail.Visible = true; lblManageCategoryAlertFail.BringToFront(); } }