private void dgTypen_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (editing && (Typen)dgTypen.SelectedItem == SelectedItem) { editing = false; ClearForm(); } else { editing = true; SelectedItem = (Typen)dgTypen.SelectedItem; if (SelectedItem != null) { txtNaam.IsReadOnly = true; txtNaam.Text = SelectedItem.Naam; txtRente.Text = SelectedItem.Rente.ToString(); txtMaxOpname.Text = SelectedItem.MaxOpname.ToString(); chBoete.IsChecked = SelectedItem.Boete; btnSave.Visibility = Visibility.Hidden; btnEdit.Visibility = Visibility.Visible; btnDelete.Visibility = Visibility.Visible; } } }
public void EditRekening(string IBAN, string BSN, double Saldo, Typen Type) { Rekeningen R = (from Rekening in db.Rekeningens where Rekening.IBAN == IBAN select Rekening).Single(); R.Rekeninghouder = BSN; R.Saldo = Saldo; R.Type = Type.Naam; }
public void EditType(string Naam, double Rente, double MaxOpname, bool Boete) { Typen T = (from Typen in db.Typens where Typen.Naam == Naam select Typen).Single(); T.Rente = Rente; T.MaxOpname = MaxOpname; T.Boete = Boete; }
public void EditRekening(string IBAN, string BSN, double Saldo, Typen Type, DateTime SluitDatum) { Rekeningen R = (from Rekening in db.Rekeningens where Rekening.IBAN == IBAN select Rekening).Single(); Klanten K = (from Klant in db.Klantens where Klant.BSN == BSN select Klant).Single(); R.IBAN = IBAN; R.Klanten = K; R.Saldo = Saldo; R.Typen = Type; R.SluitDatum = SluitDatum; }
public void NewType(string Naam, double Rente, double MaxOpname, bool Boete) { Typen T = new Typen(); T.Naam = Naam; T.Rente = Rente; T.MaxOpname = MaxOpname; T.Boete = Boete; db.Typens.InsertOnSubmit(T); }
public void NewRekening(string IBAN, string BSN, double Saldo, Typen Type) { Rekeningen R = new Rekeningen(); R.IBAN = IBAN; R.Rekeninghouder = BSN; R.Saldo = Saldo; R.Type = Type.Naam; R.OpenDatum = DateTime.Now; db.Rekeningens.InsertOnSubmit(R); }
private void ClearForm() { txtNaam.IsReadOnly = false; txtNaam.Text = ""; txtRente.Text = ""; txtMaxOpname.Text = ""; chBoete.IsChecked = false; btnSave.Visibility = Visibility.Visible; btnEdit.Visibility = Visibility.Hidden; btnDelete.Visibility = Visibility.Hidden; SelectedItem = null; }
partial void DeleteTypen(Typen instance);
partial void UpdateTypen(Typen instance);
partial void InsertTypen(Typen instance);
public void DeleteType(string Naam) { Typen T = (from Type in db.Typens where Type.Naam == Naam select Type).Single(); db.Typens.DeleteOnSubmit(T); }