private void EnterNewClaim()
        {
            KClaims newClaim = new KClaims();

            Console.WriteLine("Enter the claim id:");
            string id = Console.ReadLine();

            newClaim.ClaimId = id;

            Console.WriteLine("Enter the claim type:\n\t" +
                              "1. Car \n\t" +
                              "2. Home \n\t" +
                              "3. Theft");
            int       typeInt = int.Parse(Console.ReadLine());
            ClaimType type    = _kclaimsRepo.GetTypeFromInt(typeInt);

            newClaim.TypeofClaim = type;

            _kclaimsRepo.AddClaimToList(newClaim);



            Console.WriteLine("Enter a claim description:");
            string describe = Console.ReadLine();

            newClaim.Descrip = describe;

            Console.WriteLine("Amount of Damage: $");
            decimal amount = decimal.Parse(Console.ReadLine());

            newClaim.ClaimAmount = amount;

            Console.WriteLine("Date of Accident:");
            string accDate = Console.ReadLine();

            newClaim.IncidentDate = accDate;

            Console.WriteLine("Date of Claim:");
            string claimDate = Console.ReadLine();

            newClaim.ClaimDate = claimDate;

            Console.WriteLine("This claim is valid.  (true or false)");
            bool valid = bool.Parse(Console.ReadLine());

            newClaim.IsValid = valid;
        }
示例#2
0
 public void AddContentToQueue(KClaims claim)
 {
     _claimQueue.Enqueue(claim);
 }
示例#3
0
 public void AddClaimToList(KClaims claim)
 {
     _claimList.Add(claim);
 }