예제 #1
0
파일: Form1.cs 프로젝트: MatejLamza/PPPK
        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();
        }
예제 #2
0
파일: Form1.cs 프로젝트: MatejLamza/PPPK
        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();
        }
예제 #3
0
파일: Form1.cs 프로젝트: MatejLamza/PPPK
        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();
        }