예제 #1
0
        public ActionResult Lire(int id)
        {
            Conversation        c  = new ConversationServiceAPI().Donner(id);
            ConversationLecture cl = new ConversationLecture(c);

            return(View(cl));
        }
예제 #2
0
        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"));
        }
예제 #3
0
        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));
        }