public List <User> RetrieveAll() { List <User> m_Users; m_Users = DBUser.GetAll(); return(m_Users); }
// Initializes the database connection to the Movies Plugin database private static void initDB() { if (_databaseManager != null) { return; } string fullDBBackupPath = Config.GetSubFolder(Config.Dir.Database, dbBackupPath); string fullDBFileName = Config.GetFile(Config.Dir.Database, dbFileName); _databaseManager = new DatabaseManager(fullDBFileName, fullDBBackupPath); // check that we at least have a default user List <DBUser> users = DBUser.GetAll(); if (users.Count == 0) { DBUser defaultUser = new DBUser(); defaultUser.Name = "Default User"; defaultUser.Commit(); } // add all filter helpers _databaseManager.AddFilterHelper <DBMovieInfo>(new FilterHelperDBMovieInfo()); }
public UserManagementPane() { InitializeComponent(); // if we are in designer, break to prevent errors with rendering, it cant access the DB... if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) { return; } // grab all existing users users = DBUser.GetAll(); userBindingSource.DataSource = users; if (userBindingSource.Count == 1) { removeSourceButton.Enabled = false; } }