private void displayTournament() { int ctr = 0; list = TournamentHelper.GetTournament(); lvwTournaments.Items.Clear(); ListViewItem item; foreach (Tournament tournament in list) { item = lvwTournaments.Items.Add((++ctr).ToString()); item.SubItems.Add(tournament.tournamentID.ToString()); item.SubItems.Add(tournament.tournamentTitle.Trim()); item.SubItems.Add(tournament.tournamentStart.Year.ToString()); item.SubItems.Add(getStatus(tournament.tournamentStatus)); } }
private void frmViewTournament_Load(object sender, EventArgs e) { InitializeTournamentList(); //HIDE BUTTONS btnPrint.Visible = false; btnActivate.Visible = false; btnClose.Visible = false; //Add Tag in Button btnCreate.Tag = 1; btnUpdate.Tag = 2; btnDelete.Tag = 3; //Add Click Event in button btnCreate.Click += Button_Click; btnUpdate.Click += Button_Click; btnDelete.Click += Button_Click; list = TournamentHelper.GetTournament(); displayTournament(); }
private void GetAllTournament() { listTournament = TournamentHelper.GetTournament(); }