Beispiel #1
0
        /// <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();
                if (dgvDeliveryNoteReport.RowCount > 0)
                {
                    if (cmbVoucherType.Text == "All")
                    {
                        decVoucherTypeId = 0;
                    }
                    else
                    {
                        decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                    }
                    DataSet   dsDeliveryNoteReport = spDeliveryNoteMaster.DeliveryNoteReportPrinting(1, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), decVoucherTypeId, this.dtpFromDate.Value, this.dtpToDate.Value, cmbStatus.Text, strDeliveryMode, strInvoiceNo);
                    frmReport frmRepor             = new frmReport();
                    frmRepor.MdiParent = formMDI.MDIObj;
                    frmRepor.DeliveryNoteReportPrinting(dsDeliveryNoteReport);
                }
                else
                {
                    Messages.InformationMessage("No data found");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("DNREP10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DeliveryNoteMasterSP spDeliveryNoteMaster = new DeliveryNoteMasterSP();
         if (txtDeliveryNoteNo.Text.Trim() == string.Empty)
         {
             strInvoiceNo = string.Empty;
         }
         else
         {
             strInvoiceNo = txtDeliveryNoteNo.Text;
         }
         DateTime  FromDate     = this.dtpFromDate.Value;
         DateTime  ToDate       = this.dtpToDate.Value;
         DataTable dtblDeryNote = new DataTable();
         dtblDeryNote = spDeliveryNoteMaster.DeliveryNoteRegisterGridFillCorrespondingToInvoiceNoAndLedger(strInvoiceNo, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), FromDate, ToDate, PublicVariables._inNoOfDecimalPlaces);
         dgvDeliveryNoteRegister.DataSource = dtblDeryNote;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "DNREG2:" + ex.Message;
     }
 }