private void btnSelMX_Click(object sender, EventArgs e) { if (this.dataGridView1.Rows.Count >= 1) { frmDzpYsmx frmDzpYsmx = new frmDzpYsmx(); frmDzpYsmx.DB_ID = this.DB_ID; //修改CZQ 2015-09-16 if (DB_ID == 7) { frmDzpYsmx.Text += "Demo1"; } frmDzpYsmx.txtYear.Text = this.year; frmDzpYsmx.txtMonth.Text = this.month; frmDzpYsmx.txtFcurnumber.Text = this.dataGridView1[1, this.dataGridView1.CurrentCell.RowIndex].Value.ToString(); frmDzpYsmx.Show(); } }
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) {//双击 if (this.dataGridView1.Rows.Count >= 1) { frmDzpYsmx frmDzpYsmx = new frmDzpYsmx(); frmDzpYsmx.DB_ID = this.DB_ID; //修改CZQ 2015-09-16 if (DB_ID == 7) { frmDzpYsmx.Text += "Demo1"; } frmDzpYsmx.txtYear.Text = this.year; frmDzpYsmx.txtMonth.Text = this.month; frmDzpYsmx.txtFcurnumber.Text = this.dataGridView1[1, e.RowIndex].Value.ToString(); frmDzpYsmx.Show(); } }