コード例 #1
0
 private void BtnSave_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         db.SaveChanges();
     }
     catch
     {
         MessageBox.Show("Ошибка");
         db.Dispose();
     }
 }
コード例 #2
0
        private void BtnSAve_Click(object sender, RoutedEventArgs e)
        {
            sp.sFIO     = tbFIO.Text;
            sp.passport = tbpas.Text;
            sp.address  = txAddress.Text;


            db.SaveChanges();
        }