Exemple #1
0
        private void updateDB()
        {
            clsDB  objDB  = new clsDB(strDB);
            string SQL    = returnUpdateSQL();
            bool   blPass = objDB.ExecuteNonQuery(SQL);

            if (blPass == true)
            {
                MessageBox.Show("Your time has been added to the database.");
            }
            else
            {
                MessageBox.Show("The application failed to update the database, please try again. If the problem persists call x5101");
            }

            setupForm();
        }
Exemple #2
0
        private void setupForm()
        {
            cmbWorker.Items.Clear();
            clsDB objDB = new clsDB(strDB);
            //returning workers that have times
            string           SQL       = returnWorkers_NULLSQL();
            SQLiteDataReader objReader = objDB.returnDataReader(SQL);

            loadComboBox(objReader);
            objReader.Close();

            SQL       = returnWorkersSQL();
            objReader = objDB.returnDataReader(SQL);
            loadComboBox(objReader);

            grpTimes.Enabled        = false;
            cmbWorker.SelectedIndex = -1;
            if (cmbWorker.SelectedIndex != -1)
            {
                cmbWorker.SelectedIndex = 0;
            }
        }