Namespace LightSwitchApplication Public Class Loan Private ClsCreditProcesor As CreditProcessor 'Private Shared ReadOnly LoanProcessingFee As Decimal = My.Settings.LoanProcessingFee 'Me..Settings.LoanProcessingFee Private Sub InterestonLoan_Compute(ByRef result As Decimal) ' Set result to the desired field value result = (Principal * (RepaymentPeriod + 1)) / (200) Me.TotalLoanAmount = Me.Principal + result + 200 ClsCreditProcesor = New CreditProcessor 'Get the Loan processing fee from the application configuration setting Me.TotalLoanAmount = Me.Principal + result + ClsCreditProcesor.ProcessingFee 'Calculate what to be paid monthly to service the loan If RepaymentPeriod > 0 Then Me.MonthlyRepayment = FormatCurrency((Me.TotalLoanAmount / RepaymentPeriod), 2) End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)