Example #1
0
 private void gridMatchList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     // if clicking the match number, update the match data
     if (e.ColumnIndex == 1 && e.RowIndex >= 0)
     {
         DataGridViewTextBoxCell idCell = (DataGridViewTextBoxCell)gridMatchList.Rows[e.RowIndex].Cells[0];
         Int32 idIntVal  = (Int32)idCell.Value;
         long  idLongVal = (long)idIntVal;
         UpdateMatchDataForm updateForm = new UpdateMatchDataForm(this.competitionID, idLongVal, e.RowIndex);
         updateForm.Show();
     }
     // if clicking a team number, update the team_match data
     else if (e.ColumnIndex > 1 && e.RowIndex >= 0)
     {
         DataGridViewTextBoxCell  mIDCell   = (DataGridViewTextBoxCell)gridMatchList.Rows[e.RowIndex].Cells[0];
         DataGridViewTextBoxCell  tIDCell   = (DataGridViewTextBoxCell)gridMatchList.Rows[e.RowIndex].Cells[e.ColumnIndex + 1];
         TeamMatchActionEntryForm entryForm = new TeamMatchActionEntryForm((Int32)(mIDCell.Value), (Int32)(tIDCell.Value));
         entryForm.Show();
         DataGridViewTextBoxCell currCell = (DataGridViewTextBoxCell)gridMatchList.Rows[e.RowIndex].Cells[e.ColumnIndex];
         currCell.Selected = true;
     }
 }
Example #2
0
        private void btnAddMatchData_Click(object sender, EventArgs e)
        {
            UpdateMatchDataForm frmUpdateMatchData = new UpdateMatchDataForm(this.competitionID, INVALID_ID, INVALID_ROW);

            frmUpdateMatchData.Show();
        }