void EditMatch(int rowIndex) { DataTable dt = GridTable; string white = dt.Rows[rowIndex]["Player1"].ToString(); string black = dt.Rows[rowIndex]["Player2"].ToString(); int player1 = Convert.ToInt32(dt.Rows[rowIndex]["WhiteUserID"]); int player2 = Convert.ToInt32(dt.Rows[rowIndex]["BlackUserID"]); int round = GetRoundNo(dt.Rows[rowIndex]["Round"].ToString()); int tournamentMatchID = Convert.ToInt32(dt.Rows[rowIndex]["TournamentMatchID"]); int parentMatchID = Convert.ToInt32(dt.Rows[rowIndex]["parentMatchID"]); int matchStatusID = Convert.ToInt32(dt.Rows[rowIndex]["TournamentMatchStatusID"]); int matchTypeID = Convert.ToInt32(dt.Rows[rowIndex]["TournamentMatchTypeID"]); int statusId = Convert.ToInt32(dt.Rows[rowIndex]["StatusID"]); MatchEditor frm = new MatchEditor(); DialogResult dr = frm.Show(this.ParentForm, this.Tournament, tournamentMatchID, white, black, player1, player2, round, parentMatchID, matchStatusID, matchTypeID, statusId); if (dr == DialogResult.OK) { frm.Close(); RefreshGrid(); } return; }