/// <summary> /// On 'Print' button click to print the data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPurchaseReturnReport.Rows.Count > 0) { if (dgvPurchaseReturnReport.Rows.Count > 0) { DataSet dsPurchaseReturnReport = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblGrid = dtblReg.Copy(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); dsPurchaseReturnReport.Tables.Add(dtblGrid); dsPurchaseReturnReport.Tables.Add(dtblCompany); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.PurchaseReturnReportPrinting(dsPurchaseReturnReport, txtTotalAmount.Text); } } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("PRRT:13" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to print the data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPurchaseReturnReport.Rows.Count > 0) { if (dgvPurchaseReturnReport.Rows.Count > 0) { DataSet dsPurchaseReturnReport = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblGrid = dtblReg.Copy(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); dsPurchaseReturnReport.Tables.Add(dtblGrid); dsPurchaseReturnReport.Tables.Add(dtblCompany); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.PurchaseReturnReportPrinting(dsPurchaseReturnReport, txtTotalAmount.Text); } } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { formMDI.infoError.ErrorString = "PRRT13:" + ex.Message; } }
/// <summary> /// On 'Print' button click to print the data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPurchaseReturnReport.Rows.Count > 0) { if (dgvPurchaseReturnReport.Rows.Count > 0) { DataSet dsPurchaseReturnReport = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblGrid = dtblReg.Copy(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); dsPurchaseReturnReport.Tables.Add(dtblGrid); dsPurchaseReturnReport.Tables.Add(dtblCompany); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.PurchaseReturnReportPrinting(dsPurchaseReturnReport, txtTotalAmount.Text); } } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("PRRT:13" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }