Exemplo n.º 1
0
        public void PrintToday()
        {
            ReservationManager reser = new ReservationManager();
            //Aangeven de detum van vandaag
            DateTime today = DateTime.Today;

            Console.WriteLine("--------------------------------------------------");
            Console.WriteLine("Reserveringen");
            Console.WriteLine("Datum = " + today);
            Console.WriteLine("--------------------------------------------------");

            bool anyReservation = false;

            //checkt alle reserveringen of ze vandaag plaatvinden
            foreach (Reservation reservation in reser.Reservations)
            {
                if (reservation.date.Day == today.Day)
                {
                    reservation.Print();
                    Console.WriteLine();
                    anyReservation = true;
                }
                //als vandaag geen reserveringen zijn
                if (anyReservation == false)
                {
                    Console.WriteLine("Geen reserveringen vandaag!");
                }
            }
            Console.WriteLine("--------------------------------------------------");
        }
Exemplo n.º 2
0
        public void navigation()
        {
            Console.CursorVisible = false;
            List <string> Options = new List <string>()
            {
                "Reserveringsscherm",
                "Menuscherm",
                "Inlogscherm",
                "Exit"
            };

            while (true)
            {
                string             SelectedOption     = Selector(Options);
                ReservationManager reservationmanager = new ReservationManager();
                Menus     menus = new Menus();
                Login     login = new Login();
                AdminPage page  = new AdminPage();
                if (SelectedMenu == "Reserveringsscherm")
                {
                    Console.Clear();
                    reservationmanager.ReservationMenu();
                    Console.Read();
                }
                else if (SelectedMenu == "Menuscherm")
                {
                    Console.Clear();
                    menus.menuStart();
                    Console.Read();
                }
                else if (SelectedMenu == "Inlogscherm")
                {
                    Console.Clear();
                    bool result = login.loginScreen();
                    if (result == true)
                    {
                        page.PrintToday();
                        Console.ReadLine();
                    }
                    else
                    {
                        Console.WriteLine("Verkeerde inloggegevens");
                    }
                }
                else if (SelectedMenu == "Exit")
                {
                    Environment.Exit(0);
                }
            }
        }
Exemplo n.º 3
0
        // In de main kan de user door verschillende keuzes navigeren
        static void Main(string[] args)
        {
            Console.Write("\r\nKies een optie en druk enter: \n");
            Console.WriteLine("1) Reserveringscherm");
            Console.WriteLine("2) Menu");
            Console.WriteLine("3) Autorisatiescherm");
            Console.WriteLine("4) Afsluiten");
            Console.Write("\r\nKies een optie: ");

            switch (Console.ReadLine())
            {
            //Gaat naar reserveringsscherm
            case "1":
                ReservationManager reservationmanager = new ReservationManager();
                reservationmanager.reservationMenu();
                break;

            //Gaat naar Menu's
            case "2":
                Menus menus = new Menus();
                menus.selectMenu();
                break;

            //Gaat naar Loginscherm en dan naar adminpage als login lukt
            case "3":
                Login login  = new Login();
                bool  result = login.loginScreen();
                if (result == true)
                {
                    //adminpage();
                    break;
                }
                else
                {
                    Console.WriteLine("Verkeerde inloggevens!");
                    break;
                }

            //Sluit de console
            case "4":
                Environment.Exit(0);
                break;

            //Als de gekozen optie niet bekend is
            default:
                Console.WriteLine("Optie niet bekend");
                break;
            }
        }
Exemplo n.º 4
0
        public void navigation()
        {
start:
            Console.Clear();
            Console.WriteLine("         Navigatiescherm          ");
            Console.WriteLine("----------------------------------");
            Console.WriteLine("Beweeg met behulp van de pijl toetsen");
            Console.WriteLine("Bij te veel tekst kan je scrollen");
            Console.WriteLine("----------------------------------");
            Console.CursorVisible = false;
            List <string> Options = new List <string>()
            {
                "Reserveringsscherm",
                "Menuscherm",
                "Loginscherm",
                "Exit"
            };

            while (true)
            {
                ReservationManager reservationManager = new ReservationManager();
                Menus         menus    = new Menus();
                Login         login    = new Login();
                AdminControle controle = new AdminControle(menus);
                Console.Clear();
                Console.WriteLine("         Navigatiescherm          ");
                Console.WriteLine("----------------------------------");
                Console.WriteLine("Beweeg met behulp van de pijl keys");
                Console.WriteLine("Bij te veel tekst kan je scrollen");
                Console.WriteLine("----------------------------------");
                string SelectedOption = Selector(Options);

                if (SelectedOption == "Reserveringsscherm")
                {
                    reservationManager.reservationMenu();
                    Console.Read();
                }
                else if (SelectedOption == "Menuscherm")
                {
                    menus.menuStart();
                    Console.Read();
                }
                else if (SelectedOption == "Loginscherm")
                {
                    if (login.loginScreen())
                    {
                        controle.tablePage();
                        Console.Read();
                    }
                    else
                    {
                        Console.WriteLine("Verkeerde inloggegevens");
                        Thread.Sleep(1500);
                        goto start;
                    }
                }
                else if (SelectedOption == "Exit")
                {
                    Environment.Exit(0);
                }
            }
        }