Exemplo n.º 1
0
        private void btnAward_Click(object sender, EventArgs e)
        {
            Actor     actor = (Actor)lbActors.SelectedItem;
            AddAwards forma = new AddAwards(null, this, actor);

            forma.ShowDialog();
            if (this.award != null)
            {
                if (!DataProvider.addAward(award))
                {
                    MessageBox.Show("Error.");
                }
                else if (!DataProvider.ActorAward(actor, award))
                {
                    MessageBox.Show("Error.");
                }
                else
                {
                    MessageBox.Show("Award added successfully.");
                }
            }
            else
            {
                MessageBox.Show("Award not added.");
            }
        }
Exemplo n.º 2
0
        private void btnAwards_Click(object sender, EventArgs e)
        {
            AddAwards forma = new AddAwards(this, null, actor);

            forma.ShowDialog();
        }