Ejemplo n.º 1
0
        private void TakeCareNextClaim()
        {
            Console.Clear();
            Queue <Claim> newQ      = _repo.GetQueue();
            Claim         nextClaim = newQ.Peek();

            Console.WriteLine($"ClaimID: {nextClaim.ClaimID}\n" +
                              $"Type: {nextClaim.ClaimType}\n" +
                              $"Description: {nextClaim.Description}\n" +
                              $"Amount: {nextClaim.Amount}\n" +
                              $"DateOfIncident: {nextClaim.DateOfIncident.ToShortDateString()}\n" +
                              $"DateOfClaim: {nextClaim.DateOfClaim.ToShortDateString()}\n" +
                              $"IsValid: {nextClaim.IsValid}");

            Console.WriteLine("\nDo you want to deal with this claim now? (y/n)");
            string claimYN    = Console.ReadLine();
            string claimYesNo = claimYN.ToLower();

            if (claimYesNo == "y")
            {
                _repo.RemoveClaimFromQueue();
            }
            else
            {
            }
        }
Ejemplo n.º 2
0
        private void ShowNextClaim()
        {
            ClaimInformation claim = _claimRepo.PeekAtClaimQueue();

            Console.WriteLine($"Claim ID:{claim.ClaimID}\n + ClaimType:{claim.ClaimType}\n + Description:{claim.Description}\n + Amount of Damage: {claim.ClaimAmount}\n + Date Of Incident:{claim.DateOfIncident}\n + Date of Claim:{claim.DateOfClaim}\n + This claim is valid:{claim.IsValid}");
            Console.WriteLine("Do you want to deal with this claim now? (y/n)");
            string response = Console.ReadLine().ToLower();

            if (response == "y")
            {
                _claimRepo.RemoveClaimFromQueue();
            }
            else
            {
            }
        }