Ejemplo n.º 1
0
        private void btnDelete_Click(object sender, System.EventArgs e)
        {
            DialogResult res =
                MessageBox.Show("Är du säker?",
                                "Är du säker?",
                                MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question,
                                MessageBoxDefaultButton.Button2);

            if (res != DialogResult.Yes)
            {
                return;
            }

            int teamId = (int)this.DdTeams.SelectedValue;

            Structs.Team team = CommonCode.GetTeam(teamId);

            CommonCode.DelTeam(team);
            clearEverything();
        }