Esempio n. 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            var add = new FormAdd();

            add.ShowDialog();
            nominants = ControlDb.SelectAll();
        }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (numTabel == 0)
     {
         ControlDb.Remove((dataGridView.SelectedRows[0].DataBoundItem as Series).title);
         loadTable();
     }
 }
Esempio n. 4
0
        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();
        }