private void buttonAdd_Click(object sender, EventArgs e) { var add = new FormAdd(); add.ShowDialog(); nominants = ControlDb.SelectAll(); }
public void loadTable() { switch (numTabel) { case 0: dataGridView.DataSource = ControlDb.SelectAllFromSeries(); break; case 1: dataGridView.DataSource = ControlDb.SelectAllFromMovies(); break; case 2: dataGridView.DataSource = ControlDb.SelectAllFromMovieFigures(); break; case 3: dataGridView.DataSource = ControlDb.SelectAllFromSerieFigures(); break; case 4: dataGridView.DataSource = ControlDb.SelectAllFromMovieNominants(); break; case 5: dataGridView.DataSource = ControlDb.SelectAllFromSerieNominants(); break; } }
private void button2_Click(object sender, EventArgs e) { if (numTabel == 0) { ControlDb.Remove((dataGridView.SelectedRows[0].DataBoundItem as Series).title); loadTable(); } }
private void buttonSave_Click(object sender, EventArgs e) { Nominant nominant = new Nominant { name = textBoxName.Text, nominations = int.Parse(textBoxNominations.Text), oscars = int.Parse(textBoxOscars.Text) }; ControlDb.Add(nominant); Thread.Sleep(500); this.Close(); }