Beispiel #1
0
        private void addBtn_Click(object sender, EventArgs e)
        {
            //Add Prebeginner
            ASSESSMENT assessment = new ASSESSMENT();
            string     fname      = textBoxFname.Text;
            string     lname      = textBoxLname.Text;
            string     age        = textBoxAge.Text;
            DateTime   date       = dateTimePicker2.Value;
            string     swimT      = textBoxSwimT.Text;
            string     swimG      = textBoxSwimG.Text;
            string     grade      = textBoxGrade.Text;



            if (verif())
            {
                if (assessment.insertAssessment(fname, lname, age, date, swimT, swimG, grade))
                {
                    MessageBox.Show("Assessment Added", "Add Assessment", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Error", "Add Assessment", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }

            else
            {
                MessageBox.Show("Please Check The Information Again. There Are Empty Fields", "Add Assessment", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }