private void btnUpdateSaleOrder_Click(object sender, EventArgs e) { var key = dgvSaleOrder.CurrentRow.Cells["ID"].Value; if (key == null) { MessageBox.Show("请先选择一行数据"); } else { RowID = Int32.Parse(key.ToString()); SaleOrderForm tempForm = FormSingle.GetForm(typeof(SaleOrderForm)) as SaleOrderForm; tempForm.ShowNormal(this.ParentForm); } }
private void dgvSaleOrder_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { var key = dgvSaleOrder.Rows[e.RowIndex].Cells["ID"].Value; if (key == null) { MessageBox.Show("请先查询"); } else { RowID = Int32.Parse(key.ToString()); SaleOrderForm tempForm = FormSingle.GetForm(typeof(SaleOrderForm)) as SaleOrderForm; tempForm.ShowNormal(this.ParentForm); } }