Exemple #1
0
 public ActionResult GetPaymentRefundRecordByInvoiceId(int InvoiceId, int Skip, string FileID)
 {
     try
     {
         string path = GlobalConst.ConstantChar.Blank;
         var    getAllPaymentRefunds = _paymentRefund.GetPaymentRefundRecordByInvoiceId(InvoiceId, Skip, GlobalConst.Records.Take);
         PaymentRefundViewModel _PaymentRefundViewModel = new PaymentRefundViewModel();
         _PaymentRefundViewModel.PaymentRefundDetails = getAllPaymentRefunds.PaymentRefundDetails.Select(PaymentRefundResult => new PaymentRefund().InjectFrom(PaymentRefundResult)).Cast <PaymentRefund>().ToList();
         foreach (PaymentRefund paymentRefund in _PaymentRefundViewModel.PaymentRefundDetails)
         {
             path = Path.Combine(ConfigurationManager.AppSettings[GlobalConst.ConstantChar.StoragePath], FileID, paymentRefund.InvoiceId.ToString(), paymentRefund.PaymentRefundID.ToString());
             paymentRefund.CheckDownloadPath = path + GlobalConst.ConstantChar.DoubleSlash + paymentRefund.CheckUploadName;
         }
         _PaymentRefundViewModel.PaymentRefundCount = getAllPaymentRefunds.TotalCount;
         return(Json(_PaymentRefundViewModel, GlobalConst.ContentTypes.TextHtml));
     }
     catch (Exception ex)
     {
         _arCommonService.CreateErrorLog(ex.Message, ex.StackTrace);
         return(View());
     }
 }
        public void Get_PaymentRefundRecordByInvoiceId()
        {
            var getAllPayments = _IPaymentRefundImplBL.GetPaymentRefundRecordByInvoiceId(2, 0, 10);

            Assert.IsTrue(getAllPayments != null, "Unable to find");
        }