Esempio n. 1
0
 public ChartPriceData(MovieCategoryPrice movieCategoryPrice, int day)
 {
     _movieCategoryPrice = movieCategoryPrice;
     _price  = day == -1 ? movieCategoryPrice.DefaultRentDays : GetMovieCategoryPriceDay(movieCategoryPrice, day);
     _day    = day;
     _format = movieCategoryPrice.Format;
 }
Esempio n. 2
0
        public MovieCategoryPrice GetPrice(MovieItemFormat movieItemFormat)
        {
            MovieCategoryPrice ret = null;

            Prices.Filter = CriteriaOperator.Parse("Format = ?", movieItemFormat);
            if (Prices.Count != 0)
            {
                ret = Prices[0];
            }
            Prices.Filter = null;
            return(ret);
        }
Esempio n. 3
0
 decimal GetMovieCategoryPriceDay(MovieCategoryPrice price, int day) {
     var ret = price.GetDaysRentPrice(day);
     return ret == 0 ? price.GetDaysRentPrice(0) : ret;
 }
Esempio n. 4
0
 public ChartPriceData(MovieCategoryPrice movieCategoryPrice, int day) {
     _movieCategoryPrice = movieCategoryPrice;
     _price = day == -1 ? movieCategoryPrice.DefaultRentDays : GetMovieCategoryPriceDay(movieCategoryPrice, day);
     _day = day;
     _format = movieCategoryPrice.Format;
 }
Esempio n. 5
0
        decimal GetMovieCategoryPriceDay(MovieCategoryPrice price, int day)
        {
            var ret = price.GetDaysRentPrice(day);

            return(ret == 0 ? price.GetDaysRentPrice(0) : ret);
        }