Exemplo n.º 1
0
        private void OpenEditForm(String tableName)
        {
            switch (tableName)
            {
            case "Athletes":
                FormAddAthlete formAddAthlete = new FormAddAthlete(this);
                formAddAthlete.ButtonName = "Edit";
                formAddAthlete.ShowDialog();
                break;

            case "Arenas":
                FormAddArena formAddArena = new FormAddArena(this);
                formAddArena.ButtonName = "Edit";
                formAddArena.ShowDialog();
                break;

            case "Competitions":
                FormAddCompetition formAddCompetition = new FormAddCompetition(this);
                formAddCompetition.ButtonName = "Edit";
                formAddCompetition.ShowDialog();
                break;

            case "Countries":
                FormAddCountry formAddCountry = new FormAddCountry(this);
                formAddCountry.ButtonName = "Edit";
                formAddCountry.ShowDialog();
                break;

            case "Teams":
                FormAddTeam formAddTeam = new FormAddTeam(this);
                formAddTeam.ButtonName = "Edit";
                formAddTeam.ShowDialog();
                break;

            default:
                MessageBox.Show("Wrong table name in combobox selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
        }
Exemplo n.º 2
0
        private void button6_Click(object sender, EventArgs e)
        {
            FormAddCountry formAdd = new FormAddCountry(this);

            formAdd.ShowDialog();
        }