private void btnUnesiStudenta_Click(object sender, EventArgs e) { dgvStudenti.ClearSelection(); DodajStudenta forma = new DodajStudenta(); forma.Text = "Novi student"; forma.ShowDialog(); PrikaziStudente(); }
private void btnIzmijeniStudenta_Click(object sender, EventArgs e) { if (studentBindingSource.Current is Student selectedStudent) { DodajStudenta forma = new DodajStudenta(selectedStudent); forma.Text = "Student: " + selectedStudent.Ime + " " + selectedStudent.Prezime; forma.ShowDialog(); PrikaziStudente(); } }