示例#1
0
        public void addNewMagazine(MagazineType type, string issue, String name, int id, double price, String picture)
        {
            Magazine magazine = (Magazine)ProductFactory.CreateProduct(ProductNames.Magazine, name, id, price, picture, issue);

            if (magazine is Magazine)
            {
                magazine.Type = type;
            }
            data.addMagazine(magazine);
        }
示例#2
0
        public void addNewMusicCD(String singer, MusicCDType type, String name, int id, double price, String picture, String issue)
        {
            MusicCD musicCD = (MusicCD)ProductFactory.CreateProduct(ProductNames.MusicCD, name, id, price, picture, issue);

            if (musicCD is MusicCD)
            {
                musicCD.Type   = type;
                musicCD.Singer = singer;
            }
            data.addmusicCD(musicCD);
        }
        public MusicCD addNewMusicCD(String singer, MusicCDType type, String name, int id, double price)
        {
            MusicCD musicCD = (MusicCD)ProductFactory.CreateProduct(ProductName.MusicCD, name, id, price);

            if (musicCD is MusicCD)
            {
                musicCD.Type   = type;
                musicCD.Singer = singer;
            }
            return(musicCD);
        }
        public Magazine addNewMagazine(MagazineType type, string issue, String name, int id, double price)
        {
            Magazine magazine = (Magazine)ProductFactory.CreateProduct(ProductName.Magazine, name, id, price);

            if (magazine is Magazine)
            {
                magazine.Type  = type;
                magazine.Issue = issue;
            }
            return(magazine);
        }
示例#5
0
        public void addNewBook(String isbn, String author, String publisher, String picture, int page, String name, int id, double price, String issue, BookType type)
        {
            Book book = (Book)ProductFactory.CreateProduct(ProductNames.Book, name, id, price, picture, issue);

            if (book is Book)
            {
                book.Isbn      = isbn;
                book.Author    = author;
                book.Publisher = publisher;
                book.Type      = type;
                book.Page      = page;
            }
            data.addBook(book);
        }
        public Book addNewBook(String isbn, String author, String publisher, String cover_page_picture, int page, String name, int id, double price)
        {
            Book book = (Book)ProductFactory.CreateProduct(ProductName.Book, name, id, price);

            if (book is Book)
            {
                book.Isbn               = isbn;
                book.Author             = author;
                book.Publisher          = publisher;
                book.Cover_page_picture = cover_page_picture;
                book.Page               = page;
            }
            return(book);
        }