Ejemplo n.º 1
0
 public ActionResult CreateSuggestion(int offreId)
 {
     IOffreService offreService = new OffreService();
     suggestion suggestion = new suggestion { offre_id = offreId };
     List<offre> offres = offreService.GetOffresByUser(((string)Session["session"]).ToLower()).ToList();
     SelectList offreList = new SelectList(offres, "id", "name");
     TempData["OffreList"] = offreList;
    
     return PartialView(suggestion);
 }
Ejemplo n.º 2
0
        public ActionResult CreateSuggestion(suggestion suggestion)
        {
            IUser user = new UserService();
            user u = user.show(Session["cuser"].ToString());
            suggestionService.SendMail(u.email);
            suggestionService.SendSMS(u.tel, "TnTroc : New Suggestion ! ");
            suggestion.status = false;
           
            suggestionService.AddSuggestion(suggestion);
           
            return RedirectToAction("SuggestionByUser");

        }
Ejemplo n.º 3
0
 public void UpdateSuggestion(suggestion suggestion)
 {
     utOfWork.SuggestionRepository.Update(suggestion);
     utOfWork.Commit();
 }
Ejemplo n.º 4
0
 public void AddSuggestion(suggestion suggestion)
 {
     utOfWork.SuggestionRepository.Add(suggestion);
     utOfWork.Commit();
 }