Esempio n. 1
0
 private void PopulateEmployeeList() {
     _employeesInternal.Clear();
     var sqlDb = new SqlLiteDatabase();
     foreach (var employeeViewModel in sqlDb.SelectEmployees()) {
         _employeesInternal.Add(employeeViewModel);
     }
 }
Esempio n. 2
0
 private void startUpDoWork(object sender, DoWorkEventArgs e) {
     SqlLiteDatabase dbManager = new SqlLiteDatabase();
     var dbPath = new Uri(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "database.db"));
     if (!dbManager.CheckIfExists(dbPath)) {
         dbManager.CreateDatabase(dbPath);
         var columnDictionary = new Dictionary<string, string>() {
             {"name", "varchar(20)"},
             {"email", "varchar(20)"},
             {"completed", "int"},
             {"currentassignment", "varchar(30)"}
         };
         dbManager.CreateTable(dbPath, "employee", columnDictionary);
     }
     
 }