Пример #1
0
        public JsonResult LeaveMessage(string hid, string msg)
        {
            int  hidInt = Convert.ToInt32(hid);
            User user   = Session["user"] as My.RentingSystem.Model.User;

            DateTime dt   = DateTime.Now;
            string   date = dt.ToString();

            Message message = MessageService.AddEntity(new Message {
                message1 = msg,
                time     = date
            });

            HouseMessage hm = HouseMessageService.AddEntity(new HouseMessage {
                hid = hidInt,
                mid = message.mid,
                uid = user.uid
            });


            return(Json("success", JsonRequestBehavior.AllowGet));
        }