Пример #1
0
 public override string ToString()
 {
     return(" \n For Customer with First Name  and Last Name " + CustomerFirstName + "\t" + CustomerLastName +
            " \t the Loan Number is: " + LoanNumber +
            " \t and for the Loan Amount: " + LoanAmount.ToString("C") + "\t and for a Loan Term of " + NumberofYearsLoanTerm + " years, the Interest rate is : " +
            InterestRate + "%");
 }
Пример #2
0
 public override string ToString()
 {
     return("Customer:  " + CustomerFirst + " " +
            CustomerLast +
            "\nLoan amount:  " + LoanAmount.ToString("C") +
            "\nInterest Rate:  " + InterestRate.ToString("p2") +
            "\nLoan Duration: " + TermYears);
 }
Пример #3
0
 public override string ToString()
 {
     // return base.ToString();
     return("loanNumber: " + LoanNumber +
            "\nCustomer First Name: " + CustomerFirstName +
            "\nCustomer Last Name: " + CustomerLastName +
            "\nInterest Rate: " + InterestRate.ToString("p2") +
            "\nLoan Amount: " + LoanAmount.ToString("c") +
            "\nLoan Term: " + NumberOfYearsInLoanTerm);
 }
Пример #4
0
 public override string GetInfo()
 {
     return(FirstName + " " + LastName + " " + " " +
            "\nLoan Amount: " + "" + LoanAmount.ToString("c") + " " + "\nSquare Feet: " +
            squareFeet.ToString() + "\nNumber of Rooms: " +
            numberOfRooms.ToString() + "\nInterest Rate: " + "8.8%" +
            "\nLoan Number: " + "000561111" +
            "\nType: " + "single family detached" +
            "\nNumber of Years: " + "30");
 }
        private async Task <string> PostLoanAsync()
        {
            var handler = new HttpClientHandler()
            {
                ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
            };
            HttpClient httpClient = new HttpClient(handler);

            var request = new
            {
                referrerEmail = this.ReferrerEmail,
                party         = new
                {
                    name = new
                    {
                        firstName = FirstName,
                        lastName  = LastName
                    },
                    email          = Email,
                    homePhone      = HomePhone,
                    dateOfBirth    = DateOfBirth,
                    currentAddress = new
                    {
                        streetAddressLine1 = CurrentAddressStreet,
                        city    = CurrentAddressCity,
                        state   = CurrentAddressState,
                        zipCode = CurrentAddressZip
                    }
                },
                loanPurposeType = "PURCHASE",
                loanAmount      = LoanAmount.ToString(),
                propertyValue   = PropertyValue.ToString(),
                propertyAddress = new
                {
                    streetAddressLine1 = PropertyAddressStreet,
                    city    = PropertyAddressCity,
                    state   = PropertyAddressState,
                    zipCode = PropertyAddressZip
                },
                sendEmailInvite = false
            };

            var payload = JsonSerializer.Serialize(request);
            var req     = new HttpRequestMessage(HttpMethod.Post, "https://localhost:5000/api/LoanController");

            req.Content = new StringContent(payload, Encoding.UTF8, "application/json");


            var result = await httpClient.SendAsync(req);

            Message = "Result: " + result.StatusCode;

            return(await result.Content.ReadAsStringAsync());
        }
Пример #6
0
 public override string GetInfo()
 {
     return(FirstName + " " + LastName + " " +
            "\nLoan Amount:" + " " + LoanAmount.ToString("c") +
            "\nYear: " +
            year.ToString() + "\nMake: " +
            make.ToString() + "\nModel: " +
            model.ToString() + "\nInterest Rate: " + "8.8%" +
            "\nLoan Number: " + "0058711111" +
            "\nNumber of years: " + "15");
 }
Пример #7
0
 //Override ToString method to display  data about the loan
 public override string ToString()
 {
     return("Loan Information: " +
            "\n\tLoan Type: " + LoanType +
            "\n\tLoan Number: " + LoanNumber +
            "\n\tCustomer First Name: " + CustomerFirstName +
            "\n\tCustomer Last Name: " + CustomerLastName +
            "\n\tInterest Rate: " + InterestRate.ToString("p2") +
            "\n\tLoan Amount: " + LoanAmount.ToString("C") +
            "\n\tNumber of Years in the loan's term: " + NumOfYearsLoanTerm +
            "\n\tInterest: " + CalculateInterest().ToString("C"));
 }
Пример #8
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the Roller App");


            // perform invoice calculations until choice isn't equal to "y" or "Y"
            String choice = "y";

            while (!choice.Equals("n"))
            {
                Console.Write("Roll the Dice? : ");
                choice = Console.ReadLine();
                choice.ToLower();

                if (choice.Equals("y"))
                {
                    Console.Write("Enter Yearly Interest Rate as whole number: ");
                }
                double InterestRate = Convert.ToDouble(Console.ReadLine()) / 100;

                double InterestAmount = LoanAmount * InterestRate;


                // display the discount amount and total
                String message = "Loan Amount: " + LoanAmount.ToString("C2") + "\n"
                                 + "Interest Rate:  " + InterestRate.ToString("P2") + "\n"
                                 + "Interest:    " + InterestAmount.ToString("C2") + "\n";
                Console.WriteLine(message);

                // see if the user wants to continue

                Console.Write("Continue? (y/n): ");
                choice = Console.ReadLine();
            }

            Console.WriteLine("Thank you, bye bye");
        }