public void Execute(object parameter) { Team theTeam = parameter as Team; TeamAppServices tCmdr = new TeamAppServices(); tCmdr.DropTeam(theTeam); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); }
public void Execute(object parameter) { CreateNewTeamDialog dlg = new CreateNewTeamDialog(); dlg.ShowDialog(); if (dlg.DialogResult == true) { TeamAppServices teamCmds = new TeamAppServices(); teamCmds.CreateEmptyTeam(dlg.txtManagerName.Text, ((Country)dlg.cmbManagerCountry.SelectedItem).Name, dlg.txtTeamName.Text, dlg.txtTeamCode.Text); if (this.CommandExecutedSuccessfully != null) CommandExecutedSuccessfully(this, new EventArgs()); } }