示例#1
0
 public DocOffers(Docs docs)
 {
     if (Offer.Count >= n)
     {
         throw new LibraryException("Can't add more Offer's");
     }
     Offer.Add("Title:\t\t" + docs.Title + "\tAuthor:\t\t" + docs.Author);
     docs.InLib = false;
 }
示例#2
0
 //возможность взять книгу
 public void AddBook(Docs docs)
 {
     if (Offer.Count >= n)
     {
         throw new LibraryException("Can't add more Offer's");
     }
     else if (docs.InLib == true)
     {
         Offer.Add("Title:\t\t" + docs.Title + "\tAuthor:\t\t" + docs.Author);
     }
     else
     {
         throw new LibraryException("Book take Visitor!!");
     }
 }