private void btnSacuvaj_Click(object sender, EventArgs e) { try { string jmbg = txtSef.Text; int id_sefa = DTOManager.vratiID_Sefa(jmbg); if (id_sefa == -1) { MessageBox.Show("Ne postoji sef ciji je JMBG: " + jmbg); } else { DTOManager.SacuvajPoslovnicu(txtAdresa.Text, txtRadnoVreme.Text, id_sefa); txtAdresa.Text = ""; txtRadnoVreme.Text = ""; txtSef.Text = ""; parent.UcitajPoslovnice(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }