コード例 #1
0
 /// <summary>
 /// Nieuw boek toevoegen.
 /// </summary>
 /// <param name="_objboek">het objboek.</param>
 public static void NieuwBoek(Boek _objboek)
 {
     try
     {
         if (Product.Boekenlijst.Contains(_objboek))
         {
             Console.WriteLine("This book has already been added");
         }
         Product.Boekenlijst.Add(_objboek);
     }
     catch (NullReferenceException)
     {
         Console.WriteLine(@"No data found in the object Boek.");
     }
 }
コード例 #2
0
 /// <summary>
 /// Nieuw boek toevoegen.
 /// </summary>
 /// <param name="_titel">de titel.</param>
 /// <param name="_auteur">de auteur.</param>
 /// <param name="_taal">de taal.</param>
 /// <param name="_gewicht">het gewicht.</param>
 /// <param name="_prijs">de prijs.</param>
 /// <param name="_lengte">de lengte.</param>
 /// <param name="_hoogte">de hoogte.</param>
 /// <param name="_breedte">de breedte.</param>
 /// <param name="_isbn">hetisbn.</param>
 /// <param name="_minimum">het minimum.</param>
 /// <param name="_maximaal">het maximaal.</param>
 /// <param name="_aantalvoorraad">de aantalvoorraad.</param>
 /// <param name="_druk">de druk.</param>
 /// <param name="_boekenwinkelid">de boekenwinkelid.</param>
 public static void NieuwBoek(string _titel, string _auteur, EnumTaal _taal, int _gewicht, double _prijs, int _lengte,
                              int _hoogte, int _breedte, long _isbn, int _minimum, int _maximaal, int _aantalvoorraad, string _druk, int _boekenwinkelid)
 {
     try
     {
         var afmeting = new Afmeting(_breedte, _hoogte, _lengte);
         var objboek  = new Boek(_titel, _auteur, _taal, _gewicht, _prijs, afmeting, _isbn,
                                 _minimum, _maximaal, _aantalvoorraad, _druk, _boekenwinkelid);
         if (Product.Boekenlijst.Contains(objboek))
         {
             Console.WriteLine("This book has already been added");
         }
         Product.Boekenlijst.Add(objboek);
     }
     catch
     {
         Console.WriteLine("You have to enter data in the lines.");
     }
 }