/// <summary> /// deze constructor is voor als je een product wilt wijzigen /// </summary> /// <param name="artikelform"></param> /// <param name="product"></param> public ProductForm(ArtikelenForm artikelform, Product product) { InitializeComponent(); _productrepository = new ProductRepository(new MssqlProductContext()); this._artikelform = artikelform; this._product = product; tbNaam.Text = product.Naam; nudInkoop.Value = product.Inkoopprijs; nudVerkoop.Value = product.Verkoopprijs; nudAlcohol.Value = product.Alcoholpercentage; btnProduct.Text = "Wijzig Product"; }
/// <summary> /// deze constructor is voor als je een product wilt aanmaken /// </summary> /// <param name="artikelform"></param> public ProductForm(ArtikelenForm artikelform) { InitializeComponent(); _productrepository = new ProductRepository(new MssqlProductContext()); this._artikelform = artikelform; }
private void btnArtikelen_Click(object sender, EventArgs e) { ArtikelenForm artikelform = new ArtikelenForm(); artikelform.Show(); }