Beispiel #1
0
        static public void DoOrder()
        {
            string name;
            string autor;

            Console.WriteLine("Name:");
            name = Console.ReadLine();
            Console.WriteLine("Autor:");
            autor = Console.ReadLine();

            BookAll book1 = new BookAll("name1", "autor1", "ganre1");
            BookAll book2 = new BookAll("name2", "autor2", "ganre2");

            List <BookAll> listBookPostach1 = new List <BookAll>();

            listBookPostach1.Add(book1);
            listBookPostach1.Add(book2);

            BookAll book3 = new BookAll("name3", "autor3", "ganre3");
            BookAll book4 = new BookAll("name4", "autor4", "ganre4");

            List <BookAll> listBookPostach2 = new List <BookAll>();

            listBookPostach2.Add(book3);
            listBookPostach2.Add(book4);

            Postach post1 = new Postach("post1", listBookPostach1);
            Postach post2 = new Postach("post2", listBookPostach2);

            AbstractCompany comp = new AbstractCompany();

            comp.Addtolist(post1);
            comp.Addtolist(post2);

            Console.WriteLine("The book " + comp.ChooseProd(name, autor).name + " " + comp.ChooseProd(name, autor).autor + "was ordered. Please wait");
        }
Beispiel #2
0
 public void Addtolist(Postach post)
 {
     list.Add(post);
 }