/// <summary> /// 将用户发表评论写入UserSceneryComment表中 /// </summary> /// <param name="_UserCmtObj"></param> /// <returns></returns> public bool InsertToUserSceneryCmt(UserSceneryComment _UserCmtObj) { String Sql = "insert into UserSceneryComment(UserID,CommentContent,SceneryID,SceneryRate,State)" + "values(@UserID,@CommentContent,@SceneryID,@SceneryRate,@State)"; SqlParameter[] Paras = new SqlParameter[] { //new SqlParameter("@CommentID",CommentID), new SqlParameter("@UserID", _UserCmtObj.UserID), new SqlParameter("@CommentContent", _UserCmtObj.CommentContent), // new SqlParameter("@CommentTime",_UserCmtObj.CommentTime), new SqlParameter("@SceneryID", _UserCmtObj.SceneryID), new SqlParameter("@SceneryRate", _UserCmtObj.SceneryRate), new SqlParameter("@State", _UserCmtObj.State), }; if (SqlHelper.ExecuteNonQuery(Sql, Paras, CommandType.Text) > 0) { return(true); } return(false); }
public bool InsertToUserSceneryCmt(UserSceneryComment UserCmtObj) { return(this._SceneryInfoDAL.InsertToUserSceneryCmt(UserCmtObj)); }