public static void UpdateProductVideo(ProductVideo pv) { SQLDataAccess.ExecuteNonQuery("UPDATE Catalog.ProductVideo SET Name=@Name, PlayerCode=@PlayerCode, Description=@Description, VideoSortOrder=@VideoSortOrder WHERE ProductVideoID = @ProductVideoID", CommandType.Text, new[] { new SqlParameter("@ProductVideoId", pv.ProductVideoId), new SqlParameter("@Name", pv.Name), new SqlParameter("@PlayerCode", pv.PlayerCode), new SqlParameter("@Description", pv.Description), new SqlParameter("@VideoSortOrder", pv.VideoSortOrder) } ); }
public static void AddProductVideo(ProductVideo pv) { SQLDataAccess.ExecuteNonQuery("INSERT INTO [Catalog].[ProductVideo] ([ProductID], [Name], [PlayerCode], [Description], [VideoSortOrder]) VALUES (@ProductId, @Name, @PlayerCode, @Description, @VideoSortOrder)", CommandType.Text, new[] { new SqlParameter("@ProductID", pv.ProductId), new SqlParameter("@Name", pv.Name), new SqlParameter("@PlayerCode", pv.PlayerCode), new SqlParameter("@Description", pv.Description), new SqlParameter("@VideoSortOrder", pv.VideoSortOrder) } ); }