static void Main(string[] args) { StudentRepository studentRepository = new StudentRepository(); LibraryRepository libraryRepository = new LibraryRepository(); LoansRepository loansRepository = new LoansRepository(); Console.WriteLine("################"); Console.WriteLine("# de schoolbib #"); Console.WriteLine("################"); Console.WriteLine("Druk op toets om door te gaan."); Console.ReadKey(); LoginInterface login = new LoginInterface(); //Open login interface login.ShowLoginInterface(); //openselfservice LoanBookInterface loanBookInterface = new LoanBookInterface(login.LoggedStudent); ReturnInterface returnInterface = new ReturnInterface(login.LoggedStudent); AllLoans allLoans = new AllLoans(login.LoggedStudent); PayFines payFines = new PayFines(login.LoggedStudent); char choice; do { Console.Clear(); Console.WriteLine("###############"); Console.WriteLine("# Selfservice #"); Console.WriteLine("###############" + Environment.NewLine); Console.WriteLine($"Welcome {login.LoggedStudent.FirstName} {login.LoggedStudent.LastName}!"); Console.WriteLine("a. Boek Lenen"); Console.WriteLine("b. Boek Inleveren "); Console.WriteLine("c. Overzicht van ontlening bekijken"); Console.WriteLine("d. Ontlening verlengen"); Console.WriteLine("e. Boetes betalen"); Console.WriteLine("x. exit"); Console.Write("Maak je keuze:"); choice = Convert.ToChar(Console.ReadLine().ToLower()); switch (choice) { case 'a': loanBookInterface.ShowLoanBookInterface(); break; case 'b': returnInterface.ReturnBook(); break; case 'c': allLoans.GetLoans(); break; //case 'd': .ExtendLoan(); break; case 'e': payFines.ShowFines(); break; } } while (choice != 'x'); Console.ReadKey(); }
public void PullAllLoans() { AllLoans.Clear(); foreach (var loan in AppViewModel.GetAllLoans()) { AllLoans.Add(loan); } }