Exemple #1
0
 public static Bestelling MaakBestelling(Klant klant, Dictionary <Product, int> producten, IDFactory idFactory)
 {
     try
     {
         return(new Bestelling(idFactory.MaakBestellingID(), klant, DateTime.Now, producten));
     }
     catch (BestellingException ex)
     {
         throw new BestellingFactoryException("MaakBestelling", ex);
     }
 }
Exemple #2
0
 public static Klant MaakKlant(string naam, string adres, List <Bestelling> bestellingen, IDFactory idFactory)
 {
     try
     {
         return(new Klant(idFactory.MaakKlantID(), naam.Trim(), adres.Trim(), bestellingen));
     }
     catch (KlantException ex)
     {
         throw new KlantFactoryException("MaakKlant", ex);
     }
 }