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); }
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"); }
public void UpdateSuggestion(suggestion suggestion) { utOfWork.SuggestionRepository.Update(suggestion); utOfWork.Commit(); }
public void AddSuggestion(suggestion suggestion) { utOfWork.SuggestionRepository.Add(suggestion); utOfWork.Commit(); }