private void btnObrisi_Click(object sender, EventArgs e) { PPPKDZ2MatejLamza.StudentRow row = lbStudenti.SelectedItem as PPPKDZ2MatejLamza.StudentRow; if (row == null) { MessageBox.Show("Odaberite studenta kojeg zelite obrisati!!"); return; } row.Delete(); taStudent.Update(ds.Student); FillStudentList(); }
private void btnDodaj_Click(object sender, EventArgs e) { PPPKDZ2MatejLamza.StudentRow row = ds.Student.NewStudentRow(); row.Ime = txtIme.Text.Trim(); row.Prezime = txtPrezime.Text.Trim(); row.JMBAG = txtJMBAG.Text.Trim(); row.Email = txtEmail.Text.Trim(); ds.Student.Rows.Add(row); taStudent.Update(ds.Student); FillStudentList(); ClearAllTextBoxs(); }
private void btnUredi_Click(object sender, EventArgs e) { PPPKDZ2MatejLamza.StudentRow row = lbStudenti.SelectedItem as PPPKDZ2MatejLamza.StudentRow; if (row == null) { MessageBox.Show("Odaberite studenta kojeg zelite urediti!!"); return; } row.Ime = txtIme.Text; row.Prezime = txtPrezime.Text; row.JMBAG = txtJMBAG.Text; row.Email = txtEmail.Text; taStudent.Update(ds.Student); FillStudentList(); ClearAllTextBoxs(); }