public Wijzigen(PRODUCT prt, DataClasses2DataContext db) { InitializeComponent(); this.db = db; hetItem = prt; txtPnaam.Text = prt.productnaam; txtPrijs.Text = prt.prijs; }
private void DGproducten_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var item = DGproducten.SelectedItem; if (item != null) { PRODUCT hetItem = (PRODUCT)item; DGbestel.Items.Add(hetItem); } }
private void btnUpdate_Click(object sender, RoutedEventArgs e) { PRODUCT hetItem = new PRODUCT(); hetItem.productnaam = txtPnaam.Text; hetItem.prijs = txtPrijs.Text; db.PRODUCTs.InsertOnSubmit(hetItem); db.SubmitChanges(); }
partial void DeletePRODUCT(PRODUCT instance);
partial void UpdatePRODUCT(PRODUCT instance);
partial void InsertPRODUCT(PRODUCT instance);
private void detach_PRODUCTs(PRODUCT entity) { this.SendPropertyChanging(); entity.PRODUCTYPE = null; }
private void attach_PRODUCTs(PRODUCT entity) { this.SendPropertyChanging(); entity.PRODUCTYPE = this; }