示例#1
0
 /// <summary>
 /// 评论信息插入
 /// </summary>
 /// <param name="videa">评论信息实体参数</param>
 /// <returns></returns>
 public bool commentInsert(VideoIdeaModel vIdea)
 {
     bool flag = false;
     string cmdText = "insert videoIdea(userName,ip,contents,videoId) values(@username,@ip,@contents,@id)";
     SqlParameter[] paras = new SqlParameter[] {
         new SqlParameter("@username",vIdea.userName),
         new SqlParameter("@ip",vIdea.Ip),
         new SqlParameter("@contents",vIdea.Contents),
         new SqlParameter("@id",vIdea.Id)
     };
     int res = sqlhelper.ExecuteNonQuery(cmdText, paras, CommandType.Text);
     if (res > 0)
     {
         flag = true;
     }
     return flag;
 }
示例#2
0
 //增加评论
 public bool addComment(VideoIdeaModel videa)
 {
     return videodal.commentInsert(videa);
 }