public void AddSpicyClaim() { var newClaim = new SpicyClaims(); Console.WriteLine("Spicy Ramen Claims Division: \n" + "To begin filing a claim please fill out the following prompts:\n" + "Please enter the Claim ID:"); newClaim.ClaimID = Int32.Parse(Console.ReadLine()); Console.WriteLine("Please enter a description for the claim:"); newClaim.Description = Console.ReadLine(); Console.WriteLine("Please select the type of claim you'd like to file from the following options:\n" + "1) Car \n" + "2) Home \n" + "3) Theft \n"); var claimType = Int32.Parse(Console.ReadLine()); newClaim.TypeOfClaim = (ClaimType)claimType; Console.WriteLine("Please enter the claim amount:"); newClaim.ClaimAmount = decimal.Parse(Console.ReadLine()); Console.WriteLine("Please enter the date in which the accident took place:\n" + "Please enter the claim date in the following format - (year,month,day):"); var dateOfIncident = Console.ReadLine(); newClaim.DateOfIncident = DateTime.Parse(dateOfIncident); Console.WriteLine("Please enter the date that the claim is being filed: \n" + "Please enter the claim date in the following format - (year,month,day):"); var dateOfClaim = Console.ReadLine(); newClaim.DateOfClaim = DateTime.Parse(dateOfClaim); _spicyClaimsRepo.AddSpicyClaim(newClaim); Console.WriteLine("Please ensure that all of the information entered above is correct before continuing:\n" + "Your claim information will be filed and added to the queue:\n" + "Please press any key to continue:"); Console.ReadKey(); }
public void SpicyQueue() { var claimEins = new SpicyClaims(77429, ClaimType.Home, "Ramen too spicy, caused house fire.", new DateTime(2006, 06, 06), new DateTime(2006, 06, 27), 300000.333m); var claimZwei = new SpicyClaims(666353, ClaimType.Theft, "No noodles, possible noodle theif.", new DateTime(2020, 01, 01), new DateTime(2020, 01, 21), 15); var claimDrei = new SpicyClaims(84343, ClaimType.Car, "Noodle theif stole my car!", new DateTime(2020, 02, 7), new DateTime(2020, 02, 14), 50000); var claimVier = new SpicyClaims(43278, ClaimType.Theft, "Ramen so delicious, it stole my heart.", new DateTime(2016, 06, 06), new DateTime(2016, 06, 09), 9999999.999m); _spicyClaimsRepo.AddSpicyClaim(claimEins); _spicyClaimsRepo.AddSpicyClaim(claimZwei); _spicyClaimsRepo.AddSpicyClaim(claimDrei); _spicyClaimsRepo.AddSpicyClaim(claimVier); }
public void AddSpicyClaim(SpicyClaims claim) { _queueOfSpicyClaims.Enqueue(claim); }