Example #1
0
        public ActionResult RechercherUneDemande(int idUtilisateur, int idDemande)
        {
            DaoReponse rbd = new DaoReponse();

            rbd.AjoutReponse(idUtilisateur, idDemande);
            return(RedirectToAction("RechercherUneDemande"));
        }
Example #2
0
        public ActionResult SuiviDesDemandes(int idDemande, int?idBenevole, int?annulationParticipation)
        {
            ViewBag.idUtilisateur = 1;
            DemandeServiceDao dao = new DemandeServiceDao();

            if (idBenevole == null)
            {
                dao.AnnulerDemande(idDemande);
            }
            else if (annulationParticipation == 1)
            {
                DaoReponse daoReponse = new DaoReponse();
                daoReponse.MajDateAnnulationParticipation(idDemande, idBenevole);
            }
            else
            {
                DaoReponse daoReponse = new DaoReponse();
                daoReponse.MaJDateAcceptation(idDemande, idBenevole);
            }

            if (Request.Form["clotureEffectuee"] != null)
            {
                dao.CloturerUneDemandeFinalisee(idDemande);
            }
            else if (Request.Form["clotureNonEffectuee"] != null)
            {
                dao.CloturerUneDemandeNonFinalisee(idDemande);
            }



            return(RedirectToAction("SuiviDesDemandes"));
        }
Example #3
0
 public ReponseController(DaoQuestion daoQuestion, DaoReponse daoReponse)
 {
     this._daoQuestion = daoQuestion;
     this._daoReponse  = daoReponse;
     this._questions   = daoQuestion.GetQuestions().Result;
 }