Exemple #1
0
        private void SettingsBtn_Click(object sender, EventArgs e)
        {
            FrmSettings frmSettings = new FrmSettings();

            frmSettings.User     = user;
            frmSettings.settings = settings;
            frmSettings.ShowDialog();
            CheckSettings();
            RefreshLastEntry();
        }
Exemple #2
0
 private void CheckSettings()
 {
     using (var db = new AppDbContext())
     {
         if (db.Settings.Where(l => l.UserId.Equals(user.UserId)).Count() == 0)
         {
             MessageBox.Show("Please update your settings before proceeding.");
             FrmSettings frmSettings = new FrmSettings();
             frmSettings.User     = user;
             frmSettings.settings = settings;
             frmSettings.ShowDialog();
         }
         else
         {
             settings = db.Settings.Where(l => l.UserId == user.UserId).Single();
         }
     }
 }