/// <summary> /// Get all product categories from the Webshop /// </summary> /// <returns>Returns a list of ProductCategory objects populated with data</returns> internal static List <ProductCategory> GetAllProductCategories(out string errorMsg) { string xmlData = GetDataFromWebMethod("productcategory", "getAll"); if (WebMethodReturnedError(xmlData, out errorMsg)) { return(null); } else { errorMsg = null; List <ProductCategory> categories = ProductCategoryRepository.LoadProductCategoriesFromXml(xmlData); return(categories); } }
/// <summary> /// Get a product category from the Webshop /// </summary> /// <param name="categoryId">Category Id of the prodict category to be retrieved</param> /// <returns>Returns a ProductCategory object populated with data</returns> internal static ProductCategory GetProductCategoryById(int categoryId, out string errorMsg) { string xmlData = GetDataFromWebMethod("productcategory", "getById", "id=" + categoryId); if (WebMethodReturnedError(xmlData, out errorMsg)) { return(null); } else { errorMsg = null; ProductCategory category = ProductCategoryRepository.LoadProductCategoryFromXml(xmlData); return(category); } }
public bool SetSyncStatus(bool status) { return(ProductCategoryRepository.SetProductCategorySyncStatus(this.Id, status)); }