public Drankjes(dranken hetItem, DataClasses1DataContext db) { this.db = db; this.hetItem = hetItem; InitializeComponent(); txtNaam.Text = hetItem.NAAM; txtSoort.Text = hetItem.SOORT; txtPrijs.Text = hetItem.PRIJS.ToString(); }
private void btnSave1_Click(object sender, RoutedEventArgs e) { dranken deDrank = new dranken(); deDrank.NAAM = txtNaam.Text; deDrank.SOORT = txtSoort.Text; deDrank.PRIJS = Convert.ToDecimal(txtPrijs.Text); db.drankens.InsertOnSubmit(deDrank); db.SubmitChanges(); }
partial void Updatedranken(dranken instance);
partial void Deletedranken(dranken instance);
partial void Insertdranken(dranken instance);