private void button_T1_New_Click(object sender, EventArgs e) { AddEditThesisForm aetw = new AddEditThesisForm(this.cnt); aetw.ShowDialog(); this.refilterThesises(); }
private void dataGridView_T1_Thesises_CellClick(object sender, DataGridViewCellEventArgs e) { int col = this.dataGridView_T1_Thesises.CurrentCell.ColumnIndex; int row = this.dataGridView_T1_Thesises.CurrentCell.RowIndex; int id = (int)this.dataGridView_T1_Thesises.Rows[row].Cells["ID"].Value; // MessageBox.Show("You clicked row: " + row + ", column: " + col + ", id: " + id, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); switch (col) { case 0: AddEditThesisForm aetw = new AddEditThesisForm(this.cnt, id); aetw.ShowDialog(); this.refilterThesises(); this.dataGridView_T1_Thesises.Rows[row].Selected = true; break; case 1: FilesForm ffw = new FilesForm(this.cnt, id); ffw.ShowDialog(); break; default: //do nothing break; } }
private void dataGridView_T1_Thesises_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int row = this.dataGridView_T1_Thesises.CurrentCell.RowIndex; int id = (int)this.dataGridView_T1_Thesises.Rows[row].Cells["ID"].Value; AddEditThesisForm aetw = new AddEditThesisForm(this.cnt, id); aetw.ShowDialog(); this.refilterThesises(); this.dataGridView_T1_Thesises.Rows[row].Selected = true; }