private void BtnObrisiSmer_Click(object sender, EventArgs e) { if (listaSmerova.SelectedItems.Count == 0) { MessageBox.Show("Izaberite smer koji zelite da obrisete!"); return; } int idSmera = Int32.Parse(listaSmerova.SelectedItems[0].SubItems[0].Text); string poruka = "Da li zelite da obrisete izabrani smer?"; string title = "Pitanje"; MessageBoxButtons buttons = MessageBoxButtons.OKCancel; DialogResult result = MessageBox.Show(poruka, title, buttons); if (result == DialogResult.OK) { DTOManager.obrisiSmer(idSmera); MessageBox.Show("Brisanje uspesno obavljeno!"); this.PopuniTabeluPodacima(); } else { } }