protected override bool ReleaseSubobject(EditableSubobject editableSubobject)
        {
            if (base.ReleaseSubobject(editableSubobject))
            {
                return(true);
            }
            if (editableSubobject == movieCategoriesEditObject)
            {
                movieCategoriesEditObject = null;
                return(true);
            }
            MovieCategoryEditObject movieCategoryEditObject = editableSubobject as MovieCategoryEditObject;

            if (movieCategoryEditObject != null)
            {
                movieCategoryEditObjects.Remove(movieCategoryEditObject.VideoRentObjectOid);
                return(true);
            }
            MovieCategoryPriceEditObject movieCategoryPriceEditObject = editableSubobject as MovieCategoryPriceEditObject;

            if (movieCategoryPriceEditObject != null)
            {
                movieCategoryPriceEditObjects.Remove(movieCategoryPriceEditObject.CategoryPriceOid);
                return(true);
            }
            return(false);
        }
        internal MovieCategoryPriceEditObject GetMovieCategoryPriceEditObject(Guid categoryPriceOid)
        {
            MovieCategoryPriceEditObject movieCategoryPriceEditObject;

            if (!movieCategoryPriceEditObjects.TryGetValue(categoryPriceOid, out movieCategoryPriceEditObject))
            {
                movieCategoryPriceEditObject = new MovieCategoryPriceEditObject(this, categoryPriceOid);
                movieCategoryPriceEditObjects.Add(categoryPriceOid, movieCategoryPriceEditObject);
            }
            return(movieCategoryPriceEditObject);
        }
示例#3
0
        internal override bool ReleaseSubobject(EditableSubobject editableSubobject)
        {
            if (base.ReleaseSubobject(editableSubobject))
            {
                return(true);
            }
            if (editableSubobject == movieCategoryEditObject)
            {
                movieCategoryEditObject = null;
                return(true);
            }
            MovieCategoryPriceEditObject priceEditObject = editableSubobject as MovieCategoryPriceEditObject;

            if (priceEditObject != null)
            {
                movieCategoryPriceEditObjects.Remove(priceEditObject.CategoryPriceOid);
                return(true);
            }
            return(false);
        }
 public MovieCategoryPriceEdit(MovieCategoryPriceEditObject editObject, ModuleObjectDetail detail)
     : base(editObject, detail) {
     RetrieveFormatIcon();
 }