private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } if (dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString() + "" != "-") { Requisition.RequisitionNew frm = new Requisition.RequisitionNew(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString(),dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString()); frm.Show(); } else { Requisition.RequisitionNew frm = new Requisition.RequisitionNew(dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString()); frm.Show(); } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (NUMOFBILL == 1) { if (e.RowIndex == -1) { return; } StockAsiaDrink.COBillNew frm = new StockAsiaDrink.COBillNew(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(), REQ+1); frm.Show(); this.Close(); } else { if (e.RowIndex == -1) { return; } Requisition.RequisitionNew frm = new Requisition.RequisitionNew(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(), REQ); frm.Show(); this.Close(); } }