public ActionResult Lire(int id) { Conversation c = new ConversationServiceAPI().Donner(id); ConversationLecture cl = new ConversationLecture(c); return(View(cl)); }
public ActionResult EnvoyerMessage(MessageCreation md) { md.idEmetteur = SessionUtilisateur.Utilisateur.id; Conversation e = md.VersConversation(); if (ModelState.IsValid) { int idConversation = new ConversationServiceAPI().Creer(e); int idDestinataire = md.idDestinataire; new MessageDestinationServiceAPI().Creer(idConversation, idDestinataire, new MessageDestination()); } return(RedirectToAction("DonnerMessagesEnvoyes")); }
public ActionResult DonnerMessagesEnvoyes() { /*ConversationController cc = new ConversationController(); * return cc.Donner();*/ IEnumerable <ConversationIndex> ci = new ConversationServiceAPI() .DonnerParEmetteur(SessionUtilisateur.Utilisateur.id) .Select(j => new ConversationIndex(j)) .OrderByDescending(k => k.date) .ThenByDescending(jj => jj.id); return(View(ci)); }