private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (
         this.txtFirstName.Text != "" &&
         this.txtLastName.Text != "" &&
         this.txtEmail.Text != "" &&
         this.txtClass.Text != ""
         )
     {
         MessageBox.Show("Ca fonctionne", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ClearInput.clearInput(this);
     }
     else
     {
         MessageBox.Show("Les champs ne peuvent être vide", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
     }
 }
Exemple #2
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (
         this.txtFirstName.Text != "" &&
         this.txtLastName.Text != "" &&
         this.txtEmail.Text != "" &&
         this.txtProfession.Text != ""
         )
     {
         MessageBox.Show(TeacherClass.addTeacher(this.txtFirstName.Text, this.txtLastName.Text, this.txtEmail.Text, this.txtProfession.Text), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ClearInput.clearInput(this);
     }
     else
     {
         MessageBox.Show("Tous les champs doivent être remplis", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #3
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (
         this.txtFirstName.Text != "" &&
         this.txtLastName.Text != "" &&
         this.txtEmail.Text != "" &&
         this.txtClass.Text != ""
         )
     {
         MessageBox.Show(StudentClass.addStudent(this.txtFirstName.Text, this.txtLastName.Text, this.txtEmail.Text, this.txtClass.Text), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ClearInput.clearInput(this);
     }
     else
     {
         MessageBox.Show("Veuillez vérifié que tous les champs sont bien remplis", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void btnClear_Click(object sender, EventArgs e)
 {
     ClearInput.clearInput(this);
 }