Exemple #1
0
        private void button9_Click(object sender, EventArgs e)
        {
            var manageP = new ManageGEB(0);

            manageP.ShowDialog();
            GenresList.DataSource    = genresBindingSource;
            GenresList.DisplayMember = "Name";
            GenresList.ValueMember   = "ID_Genre";
            GenresList.DataSource    = _context.Genres.ToList();
        }
Exemple #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            var manageB = new ManageGEB(2);

            manageB.ShowDialog();
            var LB = new List <Boxes> {
                new Boxes {
                    ID_Box = 0, Name = "<отсутствует>"
                }
            };

            LB.AddRange(_context.Boxes.ToArray());
            comboBox7.DataSource = LB;
            if (manageB.genresBindingSource.Current != null)
            {
                ((Games)gamesBindingSource.Current).ID_Box = ((Boxes)manageB.genresBindingSource.Current).ID_Box;
            }
            comboBox7.SelectedValue = ((Games)gamesBindingSource.Current).ID_Box;
            manageB.Dispose();
        }
Exemple #3
0
        private void button4_Click(object sender, EventArgs e)
        {
            var manageE = new ManageGEB(1);

            manageE.ShowDialog();
            var LE = new List <Editions> {
                new Editions {
                    ID_Edition = 0, Name = "<отсутствует>"
                }
            };

            LE.AddRange(_context.Editions.ToArray());
            comboBox6.DataSource = LE;
            if (manageE.genresBindingSource.Current != null)
            {
                ((Games)gamesBindingSource.Current).ID_Edition = ((Editions)manageE.genresBindingSource.Current).ID_Edition;
            }
            comboBox6.SelectedValue = ((Games)gamesBindingSource.Current).ID_Edition;
            manageE.Dispose();
        }