private void DbSeve() { Database.SQLite SQDb; SQDb = new Database.SQLite(); SQDb.seveDb(table); }
private void DbLoad() { Database.SQLite SQDb; SQDb = new Database.SQLite(); string exePath = Environment.GetCommandLineArgs()[0]; string exeFullPath = System.IO.Path.GetFullPath(exePath); string startupPath = System.IO.Path.GetDirectoryName(exeFullPath); string DbPath = startupPath + "\\Alarm.db"; if (System.IO.File.Exists(DbPath)) { dataGrid.DataContext = SQDb.loadDb(table); } else { SQDb.createDb(); dataGrid.DataContext = SQDb.loadDb(table); } }