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

            manageP.ShowDialog();
            var LP = new List <Publishers> {
                new Publishers {
                    Name = "<отсутствует>", Id_Publisher = 0
                }
            };

            LP.AddRange(_context.Publishers.OrderBy(p => p.Name).ToArray());
            comboBox2.DataSource = LP;
            if (manageP.publishersBindingSource.Current != null)
            {
                ((Games)gamesBindingSource.Current).ID_Publisher = ((Publishers)manageP.publishersBindingSource.Current).Id_Publisher;
            }
            comboBox2.SelectedValue = ((Games)gamesBindingSource.Current).ID_Publisher;
            manageP.Dispose();
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            var manageRf = new ManagePDL(2);

            manageRf.ShowDialog();
            var LRF = new List <RF_Distributors> {
                new RF_Distributors {
                    Name = "<отсутствует>", ID_RF_Distributor = 0
                }
            };

            LRF.AddRange(_context.RF_Distributors.OrderBy(r => r.Name).ToArray());
            comboBox3.DataSource = LRF;
            if (manageRf.publishersBindingSource.Current != null)
            {
                ((Games)gamesBindingSource.Current).ID_RF_Distributor = ((RF_Distributors)manageRf.publishersBindingSource.Current).ID_RF_Distributor;
            }
            comboBox3.SelectedValue = ((Games)gamesBindingSource.Current).ID_RF_Distributor;
            manageRf.Dispose();
        }
Exemple #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            var manageD = new ManagePDL(1);

            manageD.ShowDialog();
            var LD = new List <Developers> {
                new Developers {
                    Name = "<отсутствует>", ID_Developer = 0
                }
            };

            LD.AddRange(_context.Developers.OrderBy(d => d.Name).ToArray());
            comboBox1.DataSource = LD;
            if (manageD.publishersBindingSource.Current != null)
            {
                ((Games)gamesBindingSource.Current).ID_Developer = ((Developers)manageD.publishersBindingSource.Current).ID_Developer;
            }
            comboBox1.SelectedValue = ((Games)gamesBindingSource.Current).ID_Developer;
            manageD.Dispose();
        }