private void btnAddCust_Click(object sender, EventArgs e) { frmCustomerEdit frmCustEdit = new frmCustomerEdit(); frmCustEdit.ShowDialog(); frmCustEdit.BringToFront(); }
private void dgvCompany_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1) { frmCustomerEdit frmCustEdit = new frmCustomerEdit(); frmCustEdit.BringToFront(); frmCustEdit.companyID = companyID; frmCustEdit.ShowDialog(); } }
private void btnEditCust_Click(object sender, EventArgs e) { if (companyID > 0) { frmCustomerEdit frmCustEdit = new frmCustomerEdit(); frmCustEdit.BringToFront(); frmCustEdit.companyID = companyID; frmCustEdit.ShowDialog(); } else { this.ShowMessage("请选择要编辑的客户资料!"); } }