public void LaatProductzien(Product product) { List<Vraag> vragen = mng.GetVraag(product.Naam); List<Review> reviews = mng.GetReview(product.Naam); if (reviews != null) { TextBox1.Text = product.ToString(); foreach (Review rev in reviews) { TextBox1.Text = TextBox1.Text + rev.ToString(); } if (vragen != null) { foreach (Vraag vra in vragen) { TextBox1.Text = TextBox1.Text + vra.ToString(); } } } else { TextBox1.Text = product.ToString(); if (vragen != null) { foreach (Vraag vra in vragen) { TextBox1.Text = TextBox1.Text + vra.ToString(); } } } }
public Specificatie(string model,Product product,string formaat,string duurzaamheid) { this.Model = model; this.Product = product; this.Formaat = formaat; this.Duurzaamheid = duurzaamheid; }
/// <summary> /// geeft product terug /// </summary> /// <param name="naam">naam van product</param> /// <returns></returns> public Product GetProduct(string naam) { Product result = null; string sql = "SELECT * FROM Product WHERE Naam ='" + naam + "'"; try { this.Connect(); OracleCommand command = this.conn.CreateCommand(); command.CommandText = sql; OracleDataReader reader2 = command.ExecuteReader(); while (reader2.Read()) { result = new Product(Convert.ToString(reader2["Naam"]), Convert.ToDouble(reader2["Prijs"]),Convert.ToInt32(reader2["Score"])); } } catch { return null; } this.Disconnect(); return result; }
public bool OpVoorraad(Product product) { return false; }
public bool Bestel(Product product) { return false; }
public void Voegproductoe(Product product) { this.Producten.Add(product); }