Esempio n. 1
0
        //Check if a message is Read
        public void Changereadtabel(String user, MessageDetailviewmodel model)
        {
            int msgid     = Convert.ToInt32(Convert.ToDouble(user));
            var MessageId = _userDateTime.msg.LastOrDefault(g => g.msgID == msgid);

            MessageId.isRead = 0;
            _userDateTime.SaveChanges();
        }
Esempio n. 2
0
        public ActionResult MessageDetail(string submit2, MessageDetailviewmodel model)
        {
            HttpContext.Session.Set("msgkey", Encoding.ASCII.GetBytes(submit2));
            InfoHandler a = new InfoHandler(_userManager, _signInManager, _userDateTime);

            a.Changereadtabel(submit2, model);
            // a.msgDetails(submit, model);
            return(this.RedirectToAction("TheMessage", "Home"));
        }
Esempio n. 3
0
        public ActionResult MessageDetail(MessageDetailviewmodel model)
        {
            byte[] bite;
            HttpContext.Session.TryGetValue("key", out bite);
            string      someString = Encoding.ASCII.GetString(bite);
            InfoHandler a          = new InfoHandler(_userManager, _signInManager, _userDateTime);

            a.msgDetails(someString, model);
            return(View(model));
        }
Esempio n. 4
0
 public ActionResult Inbox(String submit, MessageDetailviewmodel model)
 {
     HttpContext.Session.Set("key", Encoding.ASCII.GetBytes(submit));
     if (submit != null)
     {
         InfoHandler a = new InfoHandler(_userManager, _signInManager, _userDateTime);
         a.msgDetails(submit, model);
         return(this.RedirectToAction("MessageDetail", "Home"));
     }
     else
     {
         return(View());
     }
 }
Esempio n. 5
0
        //Get message details like title and Date/Time
        public void msgDetails(String user, MessageDetailviewmodel model)
        {
            List <Message> myMessage = _userDateTime.msg.Where(g => g.senderID == user && g.isDeleted == 0).ToList();

            model.getMsg2 = myMessage;
        }