private void SetVideoData(DAL.Video dlgData, ref VRSDataSet.tblVideoRow row) { if (row.IsNull("Title") || !row.Title.Equals(dlgData.Title)) { row.Title = dlgData.Title; } if (row.IsNull("Stock") || !row.Stock.Equals(dlgData.Stock)) { row.Stock = dlgData.Stock; } if (row.IsNull("Producer") || !row.Producer.Equals(dlgData.Producer)) { row.Producer = dlgData.Producer; } if (row.IsNull("Director") || !row.Director.Equals(dlgData.Director)) { row.Director = dlgData.Director; } if (row.IsNull("Starring") || !row.Starring.Equals(dlgData.Starring)) { row.Starring = dlgData.Starring; } if (row.IsNull("ProductionYear") || !row.ProductionYear.Equals(dlgData.ProductionYear)) { row.ProductionYear = dlgData.ProductionYear; } if (row.IsNull("Description") || !row.Description.Equals(dlgData.Description)) { row.Description = dlgData.Description; } if (row.IsNull("VideoCode") || !row.VideoCode.Equals(dlgData.VideoType)) { row.VideoCode = dlgData.VideoType; } }
/// <summary> /// 添加记录 /// </summary> /// <param name="video"></param> /// <returns>返回受影响行数</returns> public int addVideo(Video video) { string sql = "insert into Video(v_name,v_time,v_savepath,v_clickNum,v_downloadNum,v_screenImg) values(@v_name,@v_time,@v_savepath,@v_clickNum,@v_downloadNum,@v_screenImg)"; return(DBHelper.GetExcuteNonQuery(sql, AssignParameter(video))); }
/// <summary> /// 更新数据 /// </summary> /// <param name="video"></param> /// <returns>返回受影响行数</returns> public int updateVideo(Video video) { string sql = "update Video set v_name=@v_name,v_time=@v_time,v_savepath=@v_savepath,v_clickNum=@v_clickNum,v_downloadNum=@v_downloadNum,v_screenImg=@v_screenImg where V_Id=@V_Id"; return(DBHelper.GetExcuteNonQuery(sql, AssignParameter(video))); }
public void RemoveVideo(Video video) { throw new NotImplementedException(); }
public void EditVideo(Video video) { throw new NotImplementedException(); }