Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on a simple lightswitch app and I need to use classes in the app. So I tried and create a class - creditProcessor in the server section in a folder I named utilitypack. The function of the credit process is to retrieve the value set for the processing of loans in the application configuration setting.

I switched back to the loan entity code and write as follows:
VB
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

Anytime I build the project, it flashes this error:

Type 'creditprocessor' is not defined.

Please, how can I call the class under the loan entity in my project. I've tried to use some import statements but is not working.
Posted
Updated 18-Nov-14 4:42am
v3
Comments
Sergey Alexandrovich Kryukov 18-Nov-14 15:54pm    
Well, what's unclear here? You did not define CreditProcessor, or didn't reference the assembly where it is required, or misspelled its name of full name.
—SA
Member 11243997 19-Nov-14 3:20am    
How do I specify the assembly or define creditprocessor in the loan entity code? I wrote the same code in the same manner in lightswitch 2012 it worked but not working in 2013 version of visual studio.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900