Пример #1
0
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            string missID                  = tbMissID.Text.Trim().ToString();
            string commentID               = tbCommentID.Text.Trim().ToString();
            string commentTime             = tbCommentTime.Text.Trim().ToString();
            string commentIP               = tbIP.Text.Trim().ToString();
            string commentContent          = tbContent.Text.Trim().ToString();
            string commentUser             = tbUserID.Text.Trim().ToString();
            bool   isVisible               = bool.Parse(cbIsVisible.Checked.ToString());
            CTMissedPetInfoComment comment = new CTMissedPetInfoComment();

            comment.MissID         = missID;
            comment.CommentContent = commentContent;
            comment.CommentID      = commentID;
            comment.IP             = commentIP;
            comment.UserID         = commentUser;
            comment.CommentTime    = commentTime;
            comment.IsVisible      = isVisible;
            MissedPetComment missPetCommnet = new MissedPetComment();
            int updateStatus = missPetCommnet.EditKnowledgeComment(comment);

            if (updateStatus == 1)
            {
                Response.Write("<script>alert('保存成功!')</script>");
            }
            else
            {
                Response.Write("<script>alert('保存失败!')</script>");
            }
        }