private void gvYTPurchaseOrderList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用 { string viewfile = gvYTPurchaseOrderList.Columns[e.ColumnIndex].DataPropertyName; if (viewfile == "viewfile") { string YTOrder_num = this.gvYTPurchaseOrderList.CurrentRow.Cells["order_num"].Value.ToString(); string BusinessCount = this.gvYTPurchaseOrderList.CurrentRow.Cells["application_count"].Value.ToString(); string dsn_adjustable_parts = this.gvYTPurchaseOrderList.CurrentRow.Cells["crm_bill_id"].Value.ToString(); frmDistributionView frm = new frmDistributionView(YTOrder_num, BusinessCount, dsn_adjustable_parts); frm.ShowDialog(); } } }
private void gvYTPurchaseOrderList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用 { string viewfile = gvYTPurchaseOrderList.Columns[e.ColumnIndex].DataPropertyName; if (viewfile == "viewfile") { string YTOrder_num = this.gvYTPurchaseOrderList.CurrentRow.Cells["order_num"].Value.ToString(); string BusinessCount = this.gvYTPurchaseOrderList.CurrentRow.Cells["application_count"].Value.ToString(); string dsn_adjustable_parts = this.gvYTPurchaseOrderList.CurrentRow.Cells["crm_bill_id"].Value.ToString(); frmDistributionView frm = new frmDistributionView(YTOrder_num, BusinessCount, dsn_adjustable_parts); frm.ShowDialog(); } } }