// private void btEdit_Click(object sender, EventArgs e) { this.receiptMasterBindingSource.EndEdit(); if (!this.SaveChanges()) { return; } FormDialog _formDialog = new FormDialog(); _formDialog.Text = "№ " + _curentReceiptMasterRow.Number.ToString() + " " + _curentReceiptMasterRow.OrganizationRow.ShortName.ToString(); _formDialog.AcceptButton = null; ReceiptDetailByRef _peceiptDetail = new ReceiptDetailByRef(_curentReceiptMasterRow, (this.ParentForm as MainForm).fullDataSet.Product, (this.ParentForm as MainForm)); _formDialog.panel.Controls.Add(_peceiptDetail); if (DialogResult.Cancel == _formDialog.ShowDialog(this)) { this.receiptDetailBindingSource.CancelEdit(); } }
// private void btEdit_Click(object sender, EventArgs e) { this.receiptMasterBindingSource.EndEdit(); if (!this.SaveChanges()) return; FormDialog _formDialog = new FormDialog(); _formDialog.Text = "№ " + _curentReceiptMasterRow.Number.ToString() + " " + _curentReceiptMasterRow.OrganizationRow.ShortName.ToString(); _formDialog.AcceptButton = null; ReceiptDetailByRef _peceiptDetail = new ReceiptDetailByRef(_curentReceiptMasterRow,(this.ParentForm as MainForm).fullDataSet.Product,(this.ParentForm as MainForm)); _formDialog.panel.Controls.Add(_peceiptDetail); if (DialogResult.Cancel == _formDialog.ShowDialog(this)) { this.receiptDetailBindingSource.CancelEdit(); } }