private void UpdateTeam() { int si = 0; try { si = lvTeam.SelectedItems[0].Index; } catch { MessageBox.Show("Please select you want to update"); return; } Team team = listOfTeam[si]; using (Form f = new frmSaveTeam(tournament, team)) { if (DialogResult.OK == f.ShowDialog()) { MessageBox.Show("Succesfully Update the team"); DisplayData(); } } }
private void SaveTeam() { using (Form f = new frmSaveTeam(tournament)) { if (DialogResult.OK == f.ShowDialog()) { MessageBox.Show("Succesfully Added the team"); DisplayData(); } } }