private void btnDelete_Click(object sender, RoutedEventArgs e) { if (stud != null) { DBBroker broker = new DBBroker(); broker.delete(stud); } Close(); }
private void btnInsert_Click(object sender, RoutedEventArgs e) { string strFirst = txtFirst.Text; string strLast = txtLast.Text; //could add validation!!! DBBroker broker = new DBBroker(); broker.insert(strFirst, strLast); this.Close(); }
private void btnUpdate_Click(object sender, RoutedEventArgs e) { if (stud != null) { stud.LastName = txtLast.Text; stud.FirstName = txtFirst.Text; DBBroker broker = new DBBroker(); broker.update(stud); } Close(); }
private void updateCombo() { cmbStudents.ItemsSource = null; db = new DBBroker(); cmbStudents.ItemsSource = db.getData(); }