Example #1
0
        /// <summary>
        /// Genereate screen
        /// </summary>
        /// <returns></returns>
        public ActionResult ICS081()
        {
            if (!CommonUtil.IsNullOrEmpty(ICS081_ScreenData.PaymentTransNo))
            {
                IIncomeHandler handler = ServiceContainer.GetService <IIncomeHandler>() as IIncomeHandler;
                doPayment      payment = handler.SearchPayment(new doPaymentSearchCriteria()
                {
                    PaymentTransNo = ICS081_ScreenData.PaymentTransNo
                }).FirstOrDefault();
                if (payment != null)
                {
                    ViewBag.PaymentTransNo = payment.PaymentTransNo;
                    //ViewBag.MatchableBalance = payment.MatchableBalance.ToString("#,##0.00"); // Comment by Jirawat Jannet @ 2016-10-25
                    // add by Jirawat Jannet @ 2016-10-25
                    if (payment.MatchableBalanceCurrencyType == CurrencyUtil.C_CURRENCY_LOCAL)
                    {
                        ViewBag.MatchableBalance = payment.MatchableBalance.ToString("#,##0.00");
                    }
                    else
                    {
                        ViewBag.MatchableBalance = payment.MatchableBalanceUsd.ToString("#,##0.00");
                    }
                    ViewBag.MatchableBalanceCurrencyType = payment.MatchableBalanceCurrencyType;

                    //ViewBag.FirstPaymentAmount = payment.PaymentAmount?.ToString("#,##0.00"); // Comment by Jirawat Jannet @ 2016-10-25
                    // add by Jirawat Jannet @ 2016-10-25
                    if (payment.PaymentAmountCurrencyType == CurrencyUtil.C_CURRENCY_LOCAL)
                    {
                        ViewBag.FirstPaymentAmount = payment.PaymentAmount?.ToString("#,##0.00");
                    }
                    else
                    {
                        ViewBag.FirstPaymentAmount = payment.PaymentAmountUsd?.ToString("#,##0.00");
                    }
                    ViewBag.FirstPaymentAmountCurrencyType = payment.PaymentAmountCurrencyType;


                    ViewBag.SECOMBankBranch = payment.SECOMBankFullName;
                    ViewBag.PaymentDate     = payment.PaymentDate.ToString("dd-MMM-yyyy");
                    ViewBag.PayerName       = payment.Payer;
                    ViewBag.Memo            = payment.Memo;
                }
            }
            return(View("_ICS081"));
        }