Ejemplo n.º 1
0
        //Add Results
        private void btnAddResult_Click_1(object sender, EventArgs e)
        {
            if (tbScore.Text.Equals(""))
            {
                MessageBox.Show("Please enter an score of the activity in this event", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                tbScore.Focus();
                return;
            }

            //INSERT data into Stock Table

            result.EventID       = result.Event_ID_Return(cbEventName.Text);
            result.Activity      = result.Activity_Return(cbActivity.Text);
            result.Email         = cbCompUsername.Text;
            result.ActivityScore = Convert.ToInt32(tbScore.Text);

            result.addResult();

            DialogResult dialog = MessageBox.Show("Results added", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);

            if (dialog == DialogResult.OK)
            {
                frmLeaderboard add = new frmLeaderboard();
                this.Hide();
                add.Show();
            }
        }
Ejemplo n.º 2
0
        private void btnLeaderboard_Click(object sender, EventArgs e)
        {
            frmLeaderboard add = new frmLeaderboard();

            this.Hide();
            add.Show();
        }