コード例 #1
0
 private void SaveData2()
 {
     WpfApplication.Database1DataSet database1DataSet = ((WpfApplication.Database1DataSet)(this.FindResource("database1DataSet")));
     // Load data into the table Love. You can modify this code as needed.
     WpfApplication.Database1DataSetTableAdapters.LoveTableAdapter database1DataSetLoveTableAdapter = new WpfApplication.Database1DataSetTableAdapters.LoveTableAdapter();
     database1DataSetLoveTableAdapter.Connection.ConnectionString = DB_CONNECTION_STR;
     database1DataSetLoveTableAdapter.Update(database1DataSet.Love);
 }
コード例 #2
0
 private void RefreshDBData()
 {
     WpfApplication.Database1DataSet database1DataSet = ((WpfApplication.Database1DataSet)(this.FindResource("database1DataSet")));
     // Load data into the table Love. You can modify this code as needed.
     WpfApplication.Database1DataSetTableAdapters.LoveTableAdapter database1DataSetLoveTableAdapter = new WpfApplication.Database1DataSetTableAdapters.LoveTableAdapter();
     database1DataSetLoveTableAdapter.Connection.ConnectionString = DB_CONNECTION_STR;
     database1DataSetLoveTableAdapter.Fill(database1DataSet.Love);
     System.Windows.Data.CollectionViewSource loveViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("loveViewSource")));
     loveViewSource.View.MoveCurrentToFirst();
 }