Exemple #1
0
        private void LookUpClaim()
        {
            Console.Clear();
            if (_repo.ClaimsCount() > 0)
            {
                SeeIDandDate();
                Console.Write("\n\t Enter Claim ID#:");
                Claims claim = _repo.GetClaimsByID(Convert.ToInt32(Console.ReadLine()));

                if (claim != null)
                {
                    Console.WriteLine($"\n\t ClaimID: #{claim.ClaimID}\n" +
                                      $"\t Type: \t\t\t{claim.Type}\n" +
                                      $"\t Description: \t\t{claim.Description}\n" +
                                      $"\t Amount: \t\t${claim.Amount}\n" +
                                      $"\t Date of Accident: \t{claim.DateOfAccident}\n" +
                                      $"\t Date of Claim: \t{claim.DateOfClaim}\n" +
                                      $"\t IsValid: \t\t{claim.IsValid}\n" +
                                      $"..................................................................................");
                    // Console.WriteLine($"\t {claim.ClaimID} \t\t {claim.Type} \t\t {claim.Description} \t\t {claim.Amount} \t\t {claim.DateOfAccident} \t\t {claim.DateOfClaim} \t\t {claim.IsValid}\n");
                }
                else
                {
                    Console.WriteLine("\n\t Can not find Claim");
                }
            }
            else
            {
                Console.WriteLine("\n\t Queue is empty ");
            }
        }