コード例 #1
0
ファイル: ViewPayment.cs プロジェクト: anupong-s/Transaction
        public void RefreshWhenDomainModelChanged(Payment payment)
        {
            string NumberFormat = ConfigurationManager.Format.Decimal_Format;

            PaymentId = payment.Id.ToString("0000000000");
            PaymentCode = payment.PaymentCode;
            PaymentStatus = payment.Status;

            CustomerIdmId = payment.CustomerIdmPartyId.ToString("0000000000");
            CustomerName = payment.CustomerName;
            CustomerAddress = payment.CustomerAddress;
            CustomerMobilePhoneNo = payment.CustomerMobilePhoneNo;
            CustomerAccountNo = payment.CustomerRefundAccountNo;
            CustomerAccountName = payment.CustomerRefundAccountName;

            Ref1 = payment.Ref1;
            Ref2 = payment.Ref2;
            Ref3 = payment.Ref3;
            Remark = payment.Remark;

            GrandTotal_SubTotal = payment.TotalUnitAmount().ToString(NumberFormat);
            GrandTotal_WH_Amount = payment.TotalWithholdingTax().ToString(NumberFormat);
            GrandTotal_VAT_Amount = payment.TotalVat().ToString(NumberFormat);
            GrandTotal_Net_Total = payment.GrandTotal().ToString(NumberFormat);

            Summary_Total = payment.TotalNoDiscount().ToString(NumberFormat);
            Summary_Adjustment = payment.TotalDiscount().ToString(NumberFormat);

            Installment_Total = payment.InstallmentAmount().ToString(NumberFormat);
            RemainingAmount = payment.RemainingAmount().ToString(NumberFormat);

            // PaymentItems
            Items = payment.PaymentItems.CreateViewPaymentItems();
            // Installments
            InstallmentItems = payment.Installments.CreateInstallment();
        }