private void btnObrisiSefa_Click(object sender, EventArgs e) { if (sefovi.SelectedItems.Count == 0) { MessageBox.Show("Izaberite sefa koga zelite da obrisete!"); return; } int idSef = Int32.Parse(sefovi.SelectedItems[0].SubItems[8].Text); string poruka = "Da li zelite da obrisete izabranog sefa?"; string title = "Pitanje"; MessageBoxButtons buttons = MessageBoxButtons.OKCancel; DialogResult result = MessageBox.Show(poruka, title, buttons); if (result == DialogResult.OK) { DTOManager.obrisiSefa(idSef); MessageBox.Show("Brisanje sefa je uspesno obavljeno!"); this.popuniPodacima(); } else { } }