private void button1_Click(object sender, EventArgs e)
        {
            GestionEtudiant ajout = GestionEtudiant.Instance;
            EtudiantDto     etu   = new EtudiantDto(0, nomEtudiant.Text, prenomEtudiant.Text, Convert.ToDateTime(datenaissanceEtudiant.Text),
                                                    adresseEtudiant.Text, mailEtudiant.Text, Convert.ToInt32(classeEtudiant), Convert.ToInt32(villeEtudiant), Convert.ToInt32(statutEtudiant));

            ajout.AjouterEtudiant(etu);
        }
Exemple #2
0
        private void BoutonAjout_Click(object sender, EventArgs e)
        {
            GestionEtudiant suppEtu = GestionEtudiant.Instance;

            EtudiantDto etu = new EtudiantDto(Convert.ToInt32(idEtudiant.Text), nomEtudiant.Text, prenomEtudiant.Text, Convert.ToDateTime(dateNaissanceEtudiant.Text),
                                              adresseEtudiant.Text, mailEtudiant.Text, Convert.ToInt32(classeEtudiant.SelectedValue), Convert.ToInt32(villeEtudiant.SelectedValue),
                                              Convert.ToInt32(statutEtudiant.SelectedValue));

            suppEtu.SupprimerEtudiant(etu);
        }
Exemple #3
0
        public IActionResult LoginEtudiant([FromBody] EtudiantDto etu)
        {
            var obj = _maBd.Etudiant.FirstOrDefault(m => m.NoDa == etu.NoDa && m.MotPasse == etu.MotPasse);

            if (obj == null)
            {
                return(new OkObjectResult(null));
            }
            return(new OkObjectResult(obj));
        }
Exemple #4
0
        public IActionResult verifSiEtudiantExisteDeja([FromBody] EtudiantDto etu)
        {
            var obj = _maBd.Etudiant.FirstOrDefault(m => m.NoDa == etu.NoDa);

            if (obj == null)
            {
                return(new OkObjectResult(null));
            }
            return(new OkObjectResult(obj));
        }