private void CreateClaim()
        {
            ClaimContent newClaim = new ClaimContent();

            Console.WriteLine("Enter the claim id:  ");
            newClaim.ClaimID = int.Parse(Console.ReadLine());

            Console.WriteLine("Enter the date of accident: ");
            newClaim.DateOfAccident = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("Enter the date of the claim: ");
            newClaim.DateOfClaim = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("Enter the amount: ");
            newClaim.Amount = decimal.Parse(Console.ReadLine());

            Console.WriteLine("What is the type: (Car, Home, Theft)");
            newClaim.Type = Console.ReadLine();

            Console.WriteLine("Provide a description: ");
            newClaim.Description = Console.ReadLine();

            Console.WriteLine("Is this claim valid? (y/n)");
            newClaim.IsValid = IsItValid();

            _claimRepo.AddClaimsToQueue(newClaim);
        }
        private void NextTable()
        {
            Console.WriteLine("Here are the details for the next claim to be handled: ");

            ClaimContent claimContent = _claimRepo.SeeContent();

            Console.WriteLine($"ClaimID: {claimContent.ClaimID}");
            Console.WriteLine($"Type: {claimContent.Type}");
            Console.WriteLine($"Description: {claimContent.Description}");
            Console.WriteLine($"Amount: {claimContent.Amount}");
            Console.WriteLine($"DateOfAccident: {claimContent.DateOfAccident}");
            Console.WriteLine($"DateOfClaim: {claimContent.DateOfClaim}");
            Console.WriteLine($"IsValid: {claimContent.IsValid}");
        }
Ejemplo n.º 3
0
 public void AddClaimsToQueue(ClaimContent content)
 {
     _claimsQueue.Enqueue(content);
 }