public ChartPriceData(MovieCategoryPrice movieCategoryPrice, int day) { _movieCategoryPrice = movieCategoryPrice; _price = day == -1 ? movieCategoryPrice.DefaultRentDays : GetMovieCategoryPriceDay(movieCategoryPrice, day); _day = day; _format = movieCategoryPrice.Format; }
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); }
decimal GetMovieCategoryPriceDay(MovieCategoryPrice price, int day) { var ret = price.GetDaysRentPrice(day); return ret == 0 ? price.GetDaysRentPrice(0) : ret; }
decimal GetMovieCategoryPriceDay(MovieCategoryPrice price, int day) { var ret = price.GetDaysRentPrice(day); return(ret == 0 ? price.GetDaysRentPrice(0) : ret); }