public void PromoveerLidNaarMedewerker()
        {
            List <Medewerker> medewerkers = new List <Medewerker>();
            Lid lid = new Lid();

            Console.WriteLine("enter the member name to add it to the worger list...");
            lid.voornaam = Console.ReadLine();
            Console.WriteLine("enter the member last name to add it to the worger list...");
            lid.FamilieName = Console.ReadLine();

            medewerkers.Add(lid);
        }
        public void GeefOVerzichtLeden()
        {
            Lid lid = new Lid();
            CollectieBibliotheek collectie = new CollectieBibliotheek();

            Console.WriteLine("press A to see the members list...");
            ConsoleKey key = Console.ReadKey().Key;

            if (key == ConsoleKey.A)
            {
                foreach (var item in collectie.Leden)
                {
                    Console.WriteLine(item.voornaam + " " + item.FamilieName);
                }
            }
        }
Exemplo n.º 3
0
        public void RegistreeralsLid()
        {
            Console.WriteLine("please enter your birthdate...");
            Lid newlid = new Lid();

            newlid.Geboortedatum = int.Parse(Console.ReadLine());
            CollectieBibliotheek nlid = new CollectieBibliotheek();

            nlid.Leden.Add(newlid);
            Console.WriteLine("you are now a memmber...");
            Console.Clear();
            Console.WriteLine(newlid.voornaam);
            Console.WriteLine("keis wat well u doen...");
            Console.WriteLine("press A for Items uitlenen\npress B for Items terugbrengen\npress C for Items reserveren");
            ConsoleKey keyinstrotie = Console.ReadKey().Key;

            if (keyinstrotie == ConsoleKey.A)
            {
                Console.Clear();
                CollectieBibliotheek collectie = new CollectieBibliotheek();
                foreach (var item in collectie.ItemsInCollectie)
                {
                    Console.WriteLine(item.Titel + "\t" + item.SoortItem);
                }
            }
            else if (keyinstrotie == ConsoleKey.B)
            {
                Console.Clear();
                List <Item> itemsterug = new List <Item>();
                Item        terugitem  = new Item();
                Console.WriteLine("pleas enter item titel...");
                terugitem.Titel = Console.ReadLine();
                Console.WriteLine("pleas enter item Id...");
                terugitem.ItemId = int.Parse(Console.ReadLine());
                itemsterug.Add(terugitem);
            }
            else if (keyinstrotie == ConsoleKey.C)
            {
                List <Item> ItemReservatie = new List <Item>();
                Item        itemre         = new Item();
                itemre.Titel = Console.ReadLine();
                ItemReservatie.Add(itemre);
            }
        }
        public void Uitlenen(Item item, CollectieBibliotheek collectie)
        {
            Lid lid = new Lid();

            Console.WriteLine("choos what tou would lik to rent...");
            foreach (var item1 in collectie.ItemsInCollectie)
            {
                Console.WriteLine(item1.ItemId + " " + item1.Titel);
            }
            Console.WriteLine("enter the item titel or itemId to rent it...");
            ConsoleKey key = Console.ReadKey().Key;

            if (key == ConsoleKey.T)
            {
                string inpot;
                inpot = Console.ReadLine();
                if (collectie.ItemsInCollectie.Contains(item) && item.Titel == inpot)
                {
                    Console.WriteLine("item has been found");
                    lid.ItemsUitgeleend.Add(item);
                }
                else
                {
                    Console.WriteLine("item has not been found");
                }
            }
            else if (key == ConsoleKey.I)
            {
                int inpot1 = Convert.ToInt32(Console.ReadLine());
                if (collectie.ItemsInCollectie.Contains(item) && item.ItemId == inpot1)
                {
                    Console.WriteLine("item has been found");
                    lid.ItemsUitgeleend.Add(item);
                }
                else
                {
                    Console.WriteLine("item has not been found");
                }
            }
        }
        public override void ZoekItem(CollectieBibliotheek collectie)
        {
            Lid  lid  = new Lid();
            Item item = new Item();

            Console.Clear();
            Console.WriteLine("Enter your name...");
            lid.voornaam = Console.ReadLine();
            Console.WriteLine("Enter your last name...");
            lid.FamilieName = Console.ReadLine();
            Console.WriteLine("enter your berthdate...");
            Geboortedatum = int.Parse(Console.ReadLine());
            Console.Clear();
            Console.WriteLine($"Welcome by our bib {lid.voornaam}");
            Console.WriteLine("________________________________________________________");
            Console.WriteLine("Typ Z to search\ntyp T to see our collection ");
            ConsoleKey key1 = Console.ReadKey().Key;

            Console.WriteLine();
            if (key1 == ConsoleKey.Z)
            {
                Console.Clear();
                Console.WriteLine("enter titel for titelsearch\nenter ID for Idsearch...");
                string inpot = Console.ReadLine();
                if (inpot == "titel".ToLower())
                {
                    Console.Clear();
                    Console.WriteLine("enter the item Titel please...");
                    inpot = Console.ReadLine();
                    if (collectie.ItemsInCollectie.Contains(item) && item.Titel == inpot)
                    {
                        Console.WriteLine($"the item {inpot} you are searching for does existed in the collection");
                    }
                    else
                    {
                        Console.WriteLine($"the item {inpot} you are searching for does not existed in the collection");
                    }
                }
                else if (inpot == "id".ToLower())
                {
                    Console.Clear();
                    Console.WriteLine("enter the item Id please...");
                    int inpot1 = Convert.ToInt32(Console.ReadLine());
                    try
                    {
                        if (collectie.ItemsInCollectie.Contains(item) && item.ItemId == inpot1)
                        {
                            Console.WriteLine($"the item {inpot1} you are searching for does existed in the collection");
                        }
                        else
                        {
                            Console.WriteLine($"the item {inpot1} you are searching for does not existed in the collection");
                        }
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                    }
                }
            }
        }