/// <summary>
 /// Call the print in butten print click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         PurchaseMasterSP spPurchaseMaster = new PurchaseMasterSP();
         string           strColumn        = string.Empty;
         GridFill();
         if (dgvPurchaseReport.RowCount > 0)
         {
             if (rbtnInvoiceDate.Checked)
             {
                 strColumn = rbtnInvoiceDate.Text;
             }
             else
             {
                 strColumn = rbtnVoucherDate.Text;
             }
             DataSet dsPurchaseReport = spPurchaseMaster.PurchaseInvoiceReportPrinting(1, strColumn, dtpFromDate.Value, dtpToDate.Value,
                                                                                       Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), cmbStatus.Text, cmbPurchaseMode.Text,
                                                                                       Convert.ToDecimal(cmbAgainstVoucherType.SelectedValue.ToString()), txtOrderNo.Text,
                                                                                       Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), txtVoucherNo.Text, txtProductCode.Text, txtProductName.Text);
             frmReport frmReport = new frmReport();
             frmReport.MdiParent = formMDI.MDIObj;
             frmReport.PurchaseReportPrinting(dsPurchaseReport, txtTotalAmount.Text);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PIREP15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Call the print in butten print click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {

                PurchaseMasterSP spPurchaseMaster = new PurchaseMasterSP();
                string strColumn = string.Empty;
                GridFill();
                if (dgvPurchaseReport.RowCount > 0)
                {
                    if (rbtnInvoiceDate.Checked)
                    {
                        strColumn = rbtnInvoiceDate.Text;
                    }
                    else
                    {
                        strColumn = rbtnVoucherDate.Text;
                    }
                    DataSet dsPurchaseReport = spPurchaseMaster.PurchaseInvoiceReportPrinting(1, strColumn, dtpFromDate.Value, dtpToDate.Value,
                    Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), cmbStatus.Text, cmbPurchaseMode.Text,
                    Convert.ToDecimal(cmbAgainstVoucherType.SelectedValue.ToString()), txtOrderNo.Text,
                    Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), txtVoucherNo.Text, txtProductCode.Text, txtProductName.Text);
                    frmReport frmReport = new frmReport();
                    frmReport.MdiParent = formMDI.MDIObj;
                    frmReport.PurchaseReportPrinting(dsPurchaseReport, txtTotalAmount.Text);
                }
                else
                {
                    Messages.InformationMessage("No data found");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PIREP15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }