Example #1
0
        //Case 3
        private void EnterNewClaim()
        {
            Console.Clear();
            Claim Content = new Claim();

            Console.WriteLine("Enter the claim ID");
            Content.ClaimID = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Please select the claim type \n" +
                              "1. Car\n" +
                              "2. Home\n" +
                              "3. Theft\n");
            string claimTypeString = Console.ReadLine();
            int    claimTypeID     = int.Parse(claimTypeString);

            Content.ClaimType = (ClaimType)claimTypeID;
            Console.WriteLine("Please enter a claim description");
            Content.ClaimDesc = Console.ReadLine();
            Console.WriteLine("Please enter the amount of damages");
            Content.ClaimAmt = Convert.ToDecimal(Console.ReadLine());
            Console.WriteLine("Please enter the date of the accident");
            Content.IncidentDate = Convert.ToDateTime(Console.ReadLine());
            Console.WriteLine("Please enter the date of the claim");
            Content.ClaimDate = Convert.ToDateTime(Console.ReadLine());
            Console.WriteLine("Please decide if this is a valid claim(True/False)");
            Content.ClaimValid = Convert.ToBoolean(Console.ReadLine());
            _repo.AddContentToDirectory(Content);
        }