Esempio n. 1
0
        public string AddComment(string data, string patientID)
        {
            bool result = false;
            List <CommentModels> commentsList = null;

            if (!string.IsNullOrEmpty(data))
            {
                //var comment = JsonConvert.DeserializeObject<CommentModels>(data);
                CommentModels comment = new CommentModels()
                {
                    CommentOperater  = Session[USRID].ToString(),
                    CommentPatientID = patientID,
                    CommentContent   = Server.HtmlEncode(data)
                };
                result       = db.AddComments(comment);
                commentsList = db.GetCommentsList(patientID);
            }
            return(JsonConvert.SerializeObject(commentsList));
        }