/// <summary> /// Print button click, to print the selected details /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { decimal decVoucherTypeId = 0; try { string strDeliveryMode = cmbDeliveryMode.Text; string strInvoiceNo = cmbOrderNo.Text; //DeliveryNoteMasterSP spDeliveryNoteMaster = new DeliveryNoteMasterSP(); DeliveryNoteBll bllDeliveryNote = new DeliveryNoteBll(); if (dgvDeliveryNoteReport.RowCount > 0) { if (cmbVoucherType.Text == "All") { decVoucherTypeId = 0; } else { decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); } DataSet dsDeliveryNoteReport = bllDeliveryNote.DeliveryNoteReportPrinting(1, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), decVoucherTypeId, this.dtpFromDate.Value, this.dtpToDate.Value, cmbStatus.Text, strDeliveryMode, strInvoiceNo); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.DeliveryNoteReportPrinting(dsDeliveryNoteReport); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("DNREP10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }