Esempio n. 1
0
 /// <summary>
 /// Function to fill Datagirdview
 /// </summary>
 public void RejectionInReportFill()
 {
     try
     {
         RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();
         try
         {
             decimal decDeliveryNoteNo = 0;
             if (cmbDeliveryNoteNo.SelectedIndex != -1)
             {
                 decDeliveryNoteNo = Convert.ToDecimal(cmbDeliveryNoteNo.SelectedValue.ToString());
             }
             string strVoucherNo   = txtVoucherNo.Text;
             string strProductCode = txtProductCode.Text;
             dgvRejectionInReport.DataSource = SpRejectionInMaster.RejectionInReportFill(Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), strVoucherNo, Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString()), decDeliveryNoteNo, Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString()), strProductCode);
             txtFromDate.Focus();
         }
         catch (Exception ex)
         {
             MessageBox.Show("RIReport:04" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RIReport:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Function to fill VoucherType combobox
        /// </summary>
        public void VoucherTypeComboFill()
        {
            RejectionInMasterSP spRejectionInMaster = new RejectionInMasterSP();

            try
            {
                spRejectionInMaster.VoucherTypeSelectionFill(cmbVoucherType, "Rejection In", true);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RIReport:05" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Function to fill DeliveryNote No combobox
        /// </summary>
        public void DeliveryNoteComboFill()
        {
            decimal             decLedgerId         = 0;
            RejectionInMasterSP spRejectionInMaster = new RejectionInMasterSP();

            try
            {
                spRejectionInMaster.DeliveryNoteNoComboFillToLedger(cmbDeliveryNoteNo, decLedgerId, true);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RIReport:06" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Function for Print
 /// </summary>
 public void PrintReport()
 {
     try
     {
         RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();
         DataSet             dsRejectionInReport = SpRejectionInMaster.RejectionInReportPrinting(dtFromDate, dtToDate, decVoucherType, strVocherNo, decCashOrParty, decDeliveryNoteNo, decSalesManId, strProductCode);
         ////frmReport //frmReport = new frmReport();
         //frmReport.MdiParent = formMDI.MDIObj;
         //    frmreport.RejectionInReportPrinting(dsRejectionInReport);
     }
     catch (Exception ex)
     {
         MessageBox.Show("RIReport:08" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 5
0
        /// <summary>
        /// Function to fill Datagridview
        /// </summary>
        public void RegisterGridFill()
        {
            RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP();

            try
            {
                decimal decvouchertypeId = 0;
                decimal decLedgerId      = 0;
                string  strInvoiceNo     = string.Empty;
                strInvoiceNo     = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text;
                decLedgerId      = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString());
                decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                DateTime  FromDate = this.dtpFromDate.Value;
                DateTime  ToDate   = this.dtpToDate.Value;
                DataTable dtbl     = new DataTable();
                dgvRejectionInRegister.DataSource = SpRejectionInMaster.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("RIRgstr:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }