private void btnDodajVozaca_Click(object sender, EventArgs e) { var form = new FormVozac(); DialogResult dg = form.ShowDialog(); if (dg == System.Windows.Forms.DialogResult.OK) { UcitajPodatke(); } }
private void btnIzmeniVozaca_Click(object sender, EventArgs e) { if (dgvListaVozaca.SelectedRows.Count == 0) { MessageBox.Show("Morate selektovati ceo red!!!", "Obavestenje", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int rowindex = dgvListaVozaca.CurrentCell.RowIndex; int columnindex = dgvListaVozaca.CurrentCell.ColumnIndex; String pom = dgvListaVozaca.Rows[rowindex].Cells["Broj_vozacke_dozvole"].Value.ToString(); Vozac v = ListaVozaca.Instanca.GetVozac(pom.ToString()); var form = new FormVozac(v); DialogResult dg = form.ShowDialog(); if (dg == System.Windows.Forms.DialogResult.OK) { UcitajPodatke(); } }