private void btnCategoryAdd_Click(object sender, EventArgs e) { if (txtStatus.Text != "") { bool b = StatusRepo.checkIfStatusExists(txtStatus.Text); if (b) { MessageBox.Show("This status value already exists, please try again."); } else { StatusRepo.insert(Guid.NewGuid(), txtStatus.Text); MessageBox.Show("Status inserted."); List <SMLIB.Entity.Status> statuses = StatusRepo.retrieve(); fillListView(statuses); clearAll(); } } else { MessageBox.Show("Status can not be empty."); } }