func (VS *Server) videoCourseStockToHTML(c *gin.Context, video VideoCourse, serviceID bson.ObjectId) ItemHTML {
	videoHTML := VS.toViewVideoCourse(c, video)
	var iHTML ItemHTML
	iHTML.ID = video.ID
	iHTML.Name = video.Name
	// iHTML.CategoryName = "Products"
	iHTML.Photo = videoHTML.Photo
	stockFromServiceHTML := VS.stocksToHTML(c, VS.getAllPositiveStockByServiceIDandItemOrVideoID(c, serviceID, video.ID, "h_view", "videoCourseStockToHTML", "stockFromServiceHTML := VS.stocksToHTML"))
	if len(stockFromServiceHTML) != 0 {
		stockFromServiceHTML[0].Quantity = float64(len(stockFromServiceHTML))
		iHTML.Stock = append(iHTML.Stock, stockFromServiceHTML[0])
	}
	return iHTML
}
// This method take an VideoCourse and returns an ItemHTML. It is used for the real stock in the Service
This method take an VideoCourse and returns an ItemHTML. It is used for the real stock in the Service
// This method take an VideoCourse and returns an ItemHTML . It is used for the real stock in the Service
func (VS *Server) videoCourseStockToHTML(c *gin.Context, video VideoCourse, serviceID bson.ObjectId) ItemHTML {
	videoHTML := VS.toViewVideoCourse(c, video)
	var iHTML ItemHTML
	iHTML.ID = video.ID
	iHTML.Name = video.Name
	iHTML.Photo = videoHTML.Photo
	stockFromServiceHTML := VS.stocksToHTML(c, VS.getAllPositiveStockByServiceIDandItemOrVideoID(c, serviceID, video.ID, "h_view", "videoCourseStockToHTML", "stockFromServiceHTML := VS.stocksToHTML"))
	if len(stockFromServiceHTML) != 0 {
		stockFromServiceHTML[0].Quantity = float64(len(stockFromServiceHTML))
		iHTML.Stock = append(iHTML.Stock, stockFromServiceHTML[0])
	}
	return iHTML
}
func ( VS * Server ) videoCourseStockToHTML ( c * gin . Context , video VideoCourse , serviceID bson . ObjectId ) ItemHTML { videoHTML := VS . toViewVideoCourse ( c , video ) var iHTML ItemHTML iHTML . ID = video . ID iHTML . Name = video . Name iHTML . Photo = videoHTML . Photo stockFromServiceHTML := VS . stocksToHTML ( c , VS . getAllPositiveStockByServiceIDandItemOrVideoID ( c , serviceID , video . ID , " " , " " , " " ) ) if len ( stockFromServiceHTML ) != 0 { stockFromServiceHTML [ 0 ] . Quantity = float64 ( len ( stockFromServiceHTML ) ) iHTML . Stock = append ( iHTML . Stock , stockFromServiceHTML [ 0 ] ) } return iHTML }
This method take an VideoCourse and returns an ItemHTML.
This method take an VideoCourse and returns an ItemHTML .
// iHTML.CategoryName = "Products"