Esempio n. 1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (this.classData.dataGridClass.SelectedRows.Count > 0)
     {
         MessageBox.Show(ClassroomClass.deleteClassroom(this.classData.dataGridClass.CurrentRow.Cells[0].Value.ToString()), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Veuillez sélectionner une ligne pour l'éditer.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (this.txtName.Text != "")
     {
         MessageBox.Show(ClassroomClass.editClassroom(this.idClassroom.Text, this.txtName.Text, this.txtPromotionDate.Value.ToString()), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Veuillez remplir tous les champs", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }