public ResultProcessing Gravar(List <string> VariacoesProduto, List <Variation> listVariation, List <Specification> listEspecificacoes, Product objProduct, int CodigoCategoria, List <string> ListaImagens) { SubCategoria objSubCategoria = objSubCategoriasRep.Listar(where => where.CodigoSubCategoria == CodigoCategoria)[0]; var newProduct = new Product { description = objProduct.description, cost = 0, ean = objProduct.ean, height = objProduct.height, width = objProduct.width, length = objProduct.length, weight = objProduct.weight, name = objProduct.name, price = objProduct.price, promotional_price = objProduct.promotional_price, qty = objProduct.qty, images = ListaImagens, sku = objProduct.sku, status = "enabled", categories = new List <Category> { new Category { code = objSubCategoria.CodigoSubCategoria.ToString(), name = objSubCategoria.DescricaoSubCategoria } }, variations = listVariation, variation_attributes = VariacoesProduto, brand = "", specifications = listEspecificacoes }; return(new ProductApp().Post(newProduct)); }
public List <SubCategoria> ListarSubCategorias(int CodigoSubCategoria) { List <SubCategoria> list = (List <SubCategoria>)objSubCategoriasRep.Listar(where => where.CodigoSubCategoria == CodigoSubCategoria); return(list); }