public string DeleteProposer(int idSeance, int idMoniteur)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.deleteProposer(idSeance, idMoniteur);
            return("La Seance " + idSeance + "n'a plus la proposition de ce moniteur");
        }
        public string insertProposer(int id_seance, int moniteur)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.insertProposer(id_seance, moniteur);
            return("Séance ajouté");
        }
        public IEnumerable <Seance> GetAll()
        {
            SeanceDAO     dao        = new SeanceDAO();
            List <Seance> lesSeances = dao.getAllSeances();

            return(lesSeances.ToList());
        }
        public string DeleteSeance(int id)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.deleteSeance(id);
            return("Contact supprimé id " + id);
        }
        public List <proposer> GetById(int id)
        {
            SeanceDAO       dao = new SeanceDAO();
            List <proposer> LesProposerParSeance = dao.getProposerSeance(id);

            return(LesProposerParSeance);
        }
        public string verifMDP(string email, string mdp)
        {
            SeanceDAO dao        = new SeanceDAO();
            string    connection = dao.connection(email, mdp);

            return(connection);
        }
Exemple #7
0
        public string UpdateMoniteur(string descriptif, int id)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.UpdateSeance(descriptif, id);
            return("Mise à jour de la seance avec le nom " + descriptif + " and Id " + id);
        }
Exemple #8
0
        public string DeleteMoniteur(int id)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.SupprimerSeance(id);
            return("Contact supprimé id " + id);
        }
Exemple #9
0
        public Seance GetById(long id)
        {
            SeanceDAO     dao       = new SeanceDAO();
            List <Seance> lesSeance = dao.getAllSeance();

            return(lesSeance.ElementAt(0));
        }
Exemple #10
0
 public ControllerClass(CinemaContext db)
 {
     hallDAO   = new HallDAO(db);
     movieDAO  = new MovieDAO(db);
     seanceDAO = new SeanceDAO(db);
     ticketDAO = new TicketDAO(db);
     view      = new ViewClass(hallDAO.GetHalls(), hallDAO.GetSeats());
 }
Exemple #11
0
 public ControllerClass()
 {
     hallDAO        = new HallDAO();
     movieDAO       = new MovieDAO();
     seanceDAO      = new SeanceDAO();
     ticketDAO      = new TicketDAO();
     fullTextSearch = new FullTextSearch();
     view           = new ViewClass(hallDAO.GetHalls(), hallDAO.GetSeats());
 }
Exemple #12
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         SeanceDAO.Delete_client(int.Parse(txt_ID.Text));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #13
0
 private void modifier_Click(object sender, EventArgs e)
 {
     try
     {
         SeanceDAO.Update_client(int.Parse(tbID.Text), tbhdb.Text, tbhfin.Text, tbpf.Text, int.Parse(tbgr.Text), tb_id_m.Text, tbjour.Text, tbsalle.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public HttpResponseMessage AddSeance([FromBody] Seance s)
 {
     if (s != null)
     {
         SeanceDAO dao = new SeanceDAO();
         dao.addSeance(s);
         return(Request.CreateResponse(HttpStatusCode.Created, s));
     }
     else
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, s));
     }
 }
Exemple #15
0
        public HttpResponseMessage AddLicencie([FromBody] Seance s)
        {
            SeanceDAO dao = new SeanceDAO();

            dao.AddSeance(s.Id, s.Jour, s.Descriptif, s.Debut, s.Fin, s.La_categorie);

            if (s != null)
            {
                return(Request.CreateResponse(HttpStatusCode.Created, s));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, s));
            }
        }
Exemple #16
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Seances clt = SeanceDAO.Get_client_ID(int.Parse(tbID.Text));
         tbhdb.Text   = clt.h_debut;
         tbhfin.Text  = clt.h_fin;
         tbpf.Text    = clt.nom_prof;
         tbgr.Text    = clt.num_grp.ToString();
         tb_id_m.Text = clt.nom_matiere;
         tbjour.Text  = clt.jour;
         tbsalle.Text = clt.n_salle;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }