Exemplo n.º 1
0
        public void TakeCareOfNextClaim()
        {
            Console.Clear();
            Queue <Claims> newQueue = _newClaimRepo.GetQueue();

            if (newQueue.Count > 0)
            {
                Claims claim = _newClaimRepo.PeekNextInQueue();
                Console.WriteLine($"Here are the details for the next claim to be handled\n{claim.ClaimID}\n{claim.CType}\n{claim.Description}\n{claim.ClaimAmount}\n{claim.DateOfIncident}\n{claim.DateOfClaim}\n");

                Console.WriteLine("Do you want to deal with this claim now? (Y/N)");

                string doTheyAsString = Console.ReadLine();
                bool   doThey;
                switch (doTheyAsString)
                {
                case "Y":
                    doThey = true;
                    _newClaimRepo.RemoveClaimFromQueue();
                    break;

                case "y":
                    doThey = true;
                    _newClaimRepo.RemoveClaimFromQueue();
                    break;

                case "N":
                    doThey = false;
                    RunMenu();
                    break;

                case "n":
                    doThey = false;
                    RunMenu();
                    break;
                }
                Console.ReadLine();
            }
        }