private void btnprint_Click(object sender, EventArgs e) { rptVoucher rptvoucher = new rptVoucher(); rptvoucher.voucherno = this.txtvoucher.Text; rptvoucher.MdiParent = this.MdiParent; ((Control)rptvoucher).Show(); }
private void btnSave_Click(object sender, EventArgs e) { if (!this.SetData()) { return; } this.voucher.Add(); if (this.chkPrint.Checked) { rptVoucher rptvoucher = new rptVoucher(); rptvoucher.voucherno = this.txtvoucher.Text; rptvoucher.MdiParent = this.MdiParent; ((Control)rptvoucher).Show(); } this.Clear(); }