Beispiel #1
0
        public void SetPropertiesFromDataRow(DataRow dataRow)
        {
            ID = DataConverter.ToInteger(dataRow["id"]);
            string   memberCode            = DataConverter.ToString(dataRow["member_code"]);
            string   accountCode           = DataConverter.ToString(dataRow["account_code"]);
            decimal  loanAmount            = DataConverter.ToDecimal(dataRow["loan_amount"]);
            int      loanTerm              = DataConverter.ToInteger(dataRow["loan_term"]);
            decimal  annualInterestRate    = DataConverter.ToDecimal(dataRow["annual_interest_rate"]);
            DateTime dateGranted           = DataConverter.ToDateTime(dataRow["date_granted"]);
            decimal  monthlyCapitalBuildUp = DataConverter.ToDecimal(dataRow["monthly_capital_build_up"]);

            LoanAmortizationHeader las = LoanAmortizationController.GenerateLoanAmortization(
                memberCode,
                accountCode,
                loanAmount,
                loanTerm,
                annualInterestRate,
                dateGranted,
                monthlyCapitalBuildUp);


            MemberCode    = las.MemberCode;
            MemberName    = las.MemberName;
            MemberAddress = las.MemberAddress;

            AccountCode  = las.AccountCode;
            AccountTitle = las.AccountTitle;

            LoanAmount            = las.LoanAmount;
            MonthlyAmortization   = las.MonthlyAmortization;
            MonthlyCapitalBuildUp = las.MonthlyCapitalBuildUp;
            AnnualInterestRate    = las.AnnualInterestRate;
            LoanTerm      = las.LoanTerm;
            ModeOfPayment = las.ModeOfPayment;

            DateGranted      = las.DateGranted;
            DateMaturity     = las.DateMaturity;
            FirstPaymentDate = las.FirstPaymentDate;

            PaymentSchedules = las.PaymentSchedules;
        }
        private LoanAmortizationHeader GenerateLoanAmortizationHeader()
        {
            string   codeMember            = _borrower.MemberCode;
            string   codeAccount           = _loanProduct.ProductCode;
            decimal  amountLoan            = _loanDetails.LoanAmount;
            int      termLoan              = _loanDetails.LoanTerms;
            decimal  rateAnnualInterest    = _loanProduct.AnnualInterestRate;
            DateTime grantedDate           = _loanDetails.GrantedDate;
            decimal  monthlyCapitalBuildUp = _loanProduct.MonthlyCapitalBuildUp;

            LoanAmortizationHeader schedule = LoanAmortizationController.GenerateLoanAmortization(
                codeMember,
                codeAccount,
                amountLoan,
                termLoan,
                rateAnnualInterest,
                grantedDate,
                monthlyCapitalBuildUp);

            return(schedule);
        }