Example #1
0
        /*SumitButton - when it is click the stundent information is added to the database and the form is reset*/
        private void Button_Click(object sender, EventArgs e)
        {
            createStudent();

            int stRowNr = dbconn.addStudentControl(student);
            int phRowNr = dbconn.addPhoneControl(student);

            if (stRowNr == 1)
            {
                if (phRowNr > 0)
                {
                    MessageBox.Show("Student Succesfully added!\nAffected rows in Students table:" + " " + stRowNr.ToString() + "\n" + "Affected rows in StudentPhonenumber table: " + " " + phRowNr.ToString());
                }
            }

            ResetAddStudentControl();
        }