Пример #1
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (stud != null)
     {
         DBBroker broker = new DBBroker();
         broker.delete(stud);
     }
     Close();
 }
Пример #2
0
        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();
        }
Пример #3
0
 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();
 }
Пример #4
0
 private void updateCombo()
 {
     cmbStudents.ItemsSource = null;
     db = new DBBroker();
     cmbStudents.ItemsSource = db.getData();
 }