private void button1_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow.Cells["customer"].Value != null) { FormCustomerAnalysisTable form = new FormCustomerAnalysisTable(); form.Num1 = dataGridView1.CurrentRow.Cells["customer"].Value.ToString(); form.MenuCode = "M205"; form.customername = dataGridView1.CurrentRow.Cells["customer"].Value.ToString(); form.Show(); } }
private void dataGridView2_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { FormCustomerAnalysisTable form = new FormCustomerAnalysisTable(); if (dataGridView1.Rows[e.RowIndex].Cells["customer"].Value != null) { //form.Num1 = dataGridView1.Rows[e.RowIndex].Cells["customer"].Value.ToString(); form.MenuCode = "M205"; form.customername = dataGridView1.Rows[e.RowIndex].Cells["customer"].Value.ToString(); } form.ShowDialog(); }