예제 #1
0
        public ActionResult ReadMessage(string messageid)
        {
            var result = new StandardJsonResult <bool>();

            result.Try(() => {
                Guid myguid = new Guid();
                if (Guid.TryParse(messageid, out myguid))
                {
                    result.Value   = serrvice.ChangeReadStatus(myguid, BCSession.User.UserID);
                    result.Message = "已成功标记已读!";
                }
                else
                {
                    throw new KnownException("消息编号错误,标记失败");
                }
            });
            if (!result.Success)
            {
                result.Message = "标记失败!";
            }
            return(result);
        }