private void btnAddNew_Click(object sender, EventArgs e) { LicenseDetailForm licenseDetailForm = new LicenseDetailForm(this.connection); licenseDetailForm.MdiParent = this.MdiParent; licenseDetailForm.Show(); licenseDetailForm.FormClosed += LicenseDetailForm_FormClosed; }
private void licenseDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { var id = (this.licenseBindingSource.Current as model.License).Id; LicenseDetailForm licenseDetailForm = new LicenseDetailForm(this.connection, id); licenseDetailForm.MdiParent = this.MdiParent; licenseDetailForm.Show(); licenseDetailForm.FormClosed += LicenseDetailForm_FormClosed; }