Exemple #1
0
        public IList <ProductAdvertisement> GetAllBannerByType(ProductAdvertisementType productAdvertisementType)
        {
            switch (productAdvertisementType)
            {
            case ProductAdvertisementType.SliderBanner:
                return(GetAllByType(productAdvertisementType));

            case ProductAdvertisementType.WomenSquareBanner:
                return(GetAllByType(productAdvertisementType));

            case ProductAdvertisementType.MenSquareBanner:
                return(GetAllByType(productAdvertisementType));

            case ProductAdvertisementType.UnisexSquareBanner:
                return(GetAllByType(productAdvertisementType));

            case ProductAdvertisementType.MidVertRectangleBanner:
                break;

            case ProductAdvertisementType.LgVertRectangleBanner:
                break;

            case ProductAdvertisementType.MidHorRectangleBanner:
                break;

            case ProductAdvertisementType.LgHorRectangleBanner:
                break;

            default:
                break;
            }
            return(null);
        }
Exemple #2
0
 private IList <ProductAdvertisement> GetAllByType(ProductAdvertisementType type)
 {
     return(this.EntityDbSet.Where(b => b.AdType == type && b.IsActive).ToList());
 }
Exemple #3
0
 public ProductAdvertisement GetProductAdvertisementByType(ProductAdvertisementType type)
 {
     return(this.EntityDbSet.FirstOrDefault(b => b.AdType == type && b.IsActive));
 }