Esempio n. 1
0
        private void UpdateDatagrid() // Päivitetään datagrid
        {
            dataHeadache.DataContext = null;
            dataHeadache.DataContext = DatabaseAccess.ReadFromSQLite(headacheObj.UserID);

            if (dataHeadache.DataContext == null)
            {
                MessageBox.Show("Could not read from database", "Error", MessageBoxButton.OK); // Jos tulee virhe, näytetään messagebox
            }
        }