Beispiel #1
0
        /// <summary>
        /// Deletes the hours for the provided username and password
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DeleteHoursButtonClicked(object sender, EventArgs e)
        {
            var bigData = HoursSettingsHandler.GetDaysAndFullTime();

            EnterHours deleteHours = new EnterHours(usernameTextBox.Text, passwordTextBox.Text, bigData.Item1, fullTime, bigData.Item2);

            deleteHours.Delete();
        }
Beispiel #2
0
        /// <summary>
        /// Begin selenium and pass it the settings provided by the user (or default values)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubmitButtonClicked(object sender, EventArgs e)
        {
            // Verify username and password have been entered
            if (usernameTextBox.Text == "" || passwordTextBox.Text == "")
            {
                MessageBox.Show("You must enter your StarID and password");
            }
            else
            {
                var bigData = HoursSettingsHandler.GetDaysAndFullTime();

                EnterHours enterHours = new EnterHours(usernameTextBox.Text, passwordTextBox.Text, bigData.Item1, fullTime, bigData.Item2);
                bool       success    = enterHours.Add();

                if (!success)
                {
                    MessageBox.Show("Error. Please verify StarID and password are correct and try again");
                }
            }
        }