public static string ToString(ProductCategoryEnum val) { switch (val) { case ProductCategoryEnum.ClothingShoesAccessories: { return("Одежда, обувь, аксессуары"); } case ProductCategoryEnum.ChildrenClothingAndShoes: { return("Детская одежда и обувь"); } case ProductCategoryEnum.ProductsForChildrenAndToys: { return("Товары для детей и игрушки"); } case ProductCategoryEnum.WatchesAndJewelry: { return("Часы и украшения"); } case ProductCategoryEnum.BeautyAndHealth: { return("Красота и здоровье"); } default: { throw new BusinessLogicException(ExceptionCodes.FORBIDDEN); } } }
public static int GetTypeId(ProductCategoryEnum val) { switch (val) { case ProductCategoryEnum.ClothingShoesAccessories: { return((int)ProductTypeEnum.PersonalThing); } case ProductCategoryEnum.ChildrenClothingAndShoes: { return((int)ProductTypeEnum.PersonalThing); } case ProductCategoryEnum.ProductsForChildrenAndToys: { return((int)ProductTypeEnum.PersonalThing); } case ProductCategoryEnum.WatchesAndJewelry: { return((int)ProductTypeEnum.PersonalThing); } case ProductCategoryEnum.BeautyAndHealth: { return((int)ProductTypeEnum.PersonalThing); } default: { throw new BusinessLogicException(ExceptionCodes.FORBIDDEN); } } }
private Product createProduct (int pID, string pName, decimal pShelfPrice, bool pIsImported = false, ProductCategoryEnum pType = ProductCategoryEnum.Other) { var product = new Product(pID, pName, pShelfPrice) { ProductType = pType, IsImported = pIsImported }; return(product); }
private static Product createProduct (string pName, decimal pShelfPrice, bool pIsImported = false, ProductCategoryEnum pType = ProductCategoryEnum.Other) { var product = new Product(getNextProductID(), pName, pShelfPrice) { ProductType = pType, IsImported = pIsImported }; return(product); }
public Percentage GetApplicableTaxRateForProduct(ProductCategoryEnum pProductCategory, bool pIsImported) { return(GetApplicableTaxRateForProduct(IsProductCategoryExemptFromBaseTax(pProductCategory), pIsImported)); }
public bool IsProductCategoryExemptFromBaseTax(ProductCategoryEnum pProductCategory) { return(Array.IndexOf(GetExemptCategories(), pProductCategory) != -1); }