private void SetReportParameters(PaymentRefundDTO paymentRefundDetails, ReportViewer reportViewer)
    {
        ReportParameter rpReceiptNo = new ReportParameter("ReceiptNo", Convert.ToString(paymentRefundDetails.PR_ID));
        ReportParameter rpCustomerName = new ReportParameter("CustomerName", Convert.ToString(paymentRefundDetails.CustomerName));
        ReportParameter rpTradeName = new ReportParameter("TradeName", Convert.ToString(paymentRefundDetails.CustomerTradeName));
        ReportParameter rpAmount = new ReportParameter("Amount", Convert.ToString(paymentRefundDetails.PR_Amount));
        ReportParameter rpInstrumentType = new ReportParameter("InstrumentType", Convert.ToString(paymentRefundDetails.PaymentModeName));
        ReportParameter rpInstrumentNumber = new ReportParameter("InstrumentNumber", Convert.ToString(paymentRefundDetails.PR_InstrumentNo));
        ReportParameter rpInstrumentDate = new ReportParameter("InstrumentDate", Convert.ToDateTime(paymentRefundDetails.PR_InstrumentDate).ToString("dd/MMM/yyyy"));
        ReportParameter rpBankDrawn = new ReportParameter("BankDrawn", Convert.ToString(ESalesUnityContainer.Container.Resolve<IMasterService>().GetBanksDetailsById(Convert.ToInt32(paymentRefundDetails.PR_BankDrawn)).Bank_Name));
        ReportParameter rpPayer = new ReportParameter("Payer", Convert.ToString(paymentRefundDetails.PR_ReceiverName));
        ReportParameter rpPayerMobileNumber = new ReportParameter("PayerMobileNumber", Convert.ToString(paymentRefundDetails.PR_MobileNumber));

        reportViewer.LocalReport.SetParameters(new ReportParameter[] {
            rpReceiptNo, rpCustomerName, rpTradeName, rpAmount, rpInstrumentType, rpInstrumentNumber,rpInstrumentDate,
            rpBankDrawn,rpPayer,rpPayerMobileNumber});
    }
Ejemplo n.º 2
0
    protected void btnAccept_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            PaymentRefundDTO paymentRefund = new PaymentRefundDTO();
            paymentRefund.PR_CustID = Convert.ToInt32(ViewState[Globals.StateMgmtVariables.CUSTOMERID]);
            paymentRefund.PR_CreatedDate = DateTime.Now;
            paymentRefund.PR_Amount = Convert.ToDecimal(txtAmount.Text);
            paymentRefund.PR_InstrumentNo = txtInstrumentNumber.Text.Trim();
            paymentRefund.PR_VadidatedID = Convert.ToString(ViewState[Globals.StateMgmtVariables.PAYMENTID]);
            paymentRefund.PR_CreatedBy = base.GetCurrentUserId();
            paymentRefund.PR_Remarks = txtRemarks.Text.Trim();
            paymentRefund.PR_PaymentMode = 1;
            paymentRefund.PR_BankDrawn = Convert.ToInt32(ddlBankDrawn.SelectedItem.Value);
            paymentRefund.PR_BankBranch = txtBranchName.Text.Trim();
            paymentRefund.PR_InstrumentDate = Convert.ToDateTime(txtInstrumentDate.Text);
            //paymentCollection.PC_PaymentMode = Convert.ToInt32(ViewState[Globals.StateMgmtVariables.PAYMENTMODE]);
            paymentRefund.PR_ReceiverName = txtPayerName.Text;
            paymentRefund.PR_MobileNumber = txtMobileNo.Text;



            //Saves payment collection details in database
            ESalesUnityContainer.Container.Resolve<IPaymentService>().SavePaymentRefund(paymentRefund);

            //Reset controls
            ResetControls(true);

            //Shows message box to user
            ucMessageBoxForGrid.ShowMessage("Payment Refund made successfully.");
        }
    }
Ejemplo n.º 3
0
        PaymentRefundDTO IPaymentService.GetPaymentRefundDetails(int refundID)
        {
            PaymentRefundDTO paymentRefundDetails = new PaymentRefundDTO();
            paymentrefund lstPaymentRefundEntity = ESalesUnityContainer.Container.Resolve<IGenericRepository<paymentrefund>>()
                                                       .GetSingle(item => item.PR_ID == refundID);

            AutoMapper.Mapper.Map(paymentRefundDetails, lstPaymentRefundEntity);
            return paymentRefundDetails;
        }
Ejemplo n.º 4
0
 public int SavePaymentRefund(PaymentRefundDTO paymentRefund)
 {
     paymentrefund paymentRefundEntity = new paymentrefund();
     AutoMapper.Mapper.Map(paymentRefund, paymentRefundEntity);
     base.PaymentRefundRepository.Save(paymentRefundEntity);
     return paymentRefundEntity.PR_ID;
 }