public void ManagerViewClaims() { Console.Clear(); Queue <ClaimContent> claimQueue = _claimRepo.GetClaimQueue(); string[] headers = new string[] { "ClaimID", "Type", "Description of Accident", "Amount", "Date of Accident", "Date of Claim", "IsValid" }; UI_Format ConsoleFormatter = new UI_Format(1, UI_Format.Align.Left, headers); #region DATA List <string[]> claimInfo = new List <string[]>(); foreach (var claim in claimQueue) { claimInfo.Add(new string[] { $"{claim.ClaimNumber}", $"{claim.ClaimType}", $"{claim.ClaimDescription}", $"${claim.ClaimAmount}", $"{claim.DateOfAccident}", $"{claim.DateOfClaim}", $"{claim.IsValid}" }); } string[][] data = claimInfo.ToArray(); #endregion ArrayList arr = new ArrayList(data); ConsoleFormatter.RePrint(arr); //Get data variable from the link in the description Console.WriteLine(); Console.WriteLine($"\n\nEnd of Claims..." + $"\n Press Enter To Return To Manager Menu..."); Console.ReadLine(); ManagerOptions(); }
public void ManagerDealWithClaim() { if (_claimRepo.HasContent()) { Console.Clear(); Console.WriteLine(">Take Care of Next Claim"); //public ClaimContent content =_claimRepo.DealWithClaim(); ClaimContent content = _claimRepo.ViewNextClaim(); string[] headers = new string[] { "ClaimID", "Type", "Description of Accident", "Amount", "Date of Accident", "Date of Claim", "IsValid" }; UI_Format ConsoleFormatter = new UI_Format(1, UI_Format.Align.Left, headers); #region DATA //List<ClaimContent> string[][] data = new string[][] { new string[] { $"{content.ClaimNumber}", $"{content.ClaimType}", $"{content.ClaimDescription}", $"${content.ClaimAmount}", $"{content.DateOfAccident}", $"{content.DateOfClaim}", $"{content.IsValid}" }, }; #endregion ArrayList arr = new ArrayList(data); ConsoleFormatter.RePrint(arr); //Get data variable from the link in the description Console.WriteLine($">Would You Like to Deal With This Claim? (Y/N)"); string nextClaimInput = Console.ReadLine().ToLower(); switch (nextClaimInput) { case "y": case "yes": ManagerRemoveOrDealAnyClaim(content.ClaimType); break; case "n": case "no": CancelTakingCareOfManagerClaim(content.ClaimType); break; default: ErrorOnMainClaimScreen(nextClaimInput); break; } } else { Console.Clear(); Console.WriteLine($">Take Care of Next Claim" + $"\nGood Work! All Claims Have Been Dealt With!" + $"\nLet's Work on Adding New Claims to Deal With!" + $"\nPress Enter to Return to the Manager Menu..."); Console.ReadLine(); ManagerOptions(); } }
public void SeeAllClaims() { Console.Clear(); Queue <ClaimContent> claimQueue = _claimRepo.GetClaimQueue(); string[] headers = new string[] { "ClaimID", "Type", "Description of Accident", "Amount", "Date of Accident", "Date of Claim", "IsValid" }; UI_Format ConsoleFormatter = new UI_Format(1, UI_Format.Align.Left, headers); #region DATA //List<ClaimContent> List <string[]> claimInfo = new List <string[]>(); foreach (var claim in claimQueue) { claimInfo.Add(new string[] { $"{claim.ClaimNumber}", $"{claim.ClaimType}", $"{claim.ClaimDescription}", $"${claim.ClaimAmount}", $"{claim.DateOfAccident}", $"{claim.DateOfClaim}", $"{claim.IsValid}" }); } //foreach (ClaimContent content in claimQueue) //{ string[][] data = claimInfo.ToArray(); //string[][] data = // new string[][] { // new string[] { // $"{content.ClaimNumber}", $"{content.ClaimType}", $"{content.ClaimDescription}", $"${content.ClaimAmount}", $"{content.DateOfAccident}",$"{content.DateOfClaim}",$"{content.IsValid}"}, //}; #endregion ArrayList arr = new ArrayList(data); ConsoleFormatter.RePrint(arr); //Get data variable from the link in the description Console.WriteLine(); //} //Console.Clear(); //Console.WriteLine($"\t>See All Claims"); //Console.WriteLine($"ClaimID\tType\tDescription\t\tAmount\tDate of Accident\tDate of Claim\tIs Valid"); //foreach (ClaimContent content in claimQueue) //{ // Console.WriteLine($"\n{content.ClaimNumber}\t{content.ClaimType}\t{content.ClaimDescription}\t${content.ClaimAmount}\t{content.DateOfAccident}\t{content.DateOfClaim}\t{content.IsValid}"); //} Console.WriteLine($"\n\nEnd of Claims..." + $"\n Press Enter To Return To Menu..."); Console.ReadLine(); }