private void grv_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex >= 0) { if (e.ColumnIndex >= 0) { if (this.grv.Columns[e.ColumnIndex].DataPropertyName == "R1") { frmNYDetail frmNYDetail = new frmNYDetail(this.grv.CurrentCell.Value.ToString().Trim(), "", ""); frmNYDetail.ShowDialog(); } else { if (this.grv.Columns[e.ColumnIndex].DataPropertyName == "F2") { frmQYDetail frmQYDetail = new frmQYDetail(this.grv.CurrentCell.Value.ToString().Trim(), "", ""); frmQYDetail.ShowDialog(); } } } } }
private void gridView1_RowCellClick(object sender, RowCellClickEventArgs e) { if (e.Column.FieldName.ToUpper() == "R1") { frmNYDetail frmNYDetail = new frmNYDetail(e.CellValue.ToString(), "", ""); frmNYDetail.ShowDialog(); } if (e.Column.FieldName.ToUpper() == "F2") { frmQYDetail frmQYDetail = new frmQYDetail(e.CellValue.ToString(), "", ""); frmQYDetail.ShowDialog(); } }
private void txtDWMC_MouseUp(object sender, MouseEventArgs e) { frmQYDetail frmQYDetail = new frmQYDetail(this.txtDWMC.Text.Trim(), "", ""); frmQYDetail.ShowDialog(); }