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 MovieCategoryEditObject GetMovieCategoryEditObject(Guid categoryOid) { MovieCategoryEditObject movieCategoryEditObject; if (!movieCategoryEditObjects.TryGetValue(categoryOid, out movieCategoryEditObject)) { movieCategoryEditObject = new MovieCategoryEditObject(this, categoryOid); movieCategoryEditObjects.Add(categoryOid, movieCategoryEditObject); } return(movieCategoryEditObject); }
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); }
MovieCategoryEdit CreateMovieCategoryEdit(out List <MovieCategoryPriceEdit> priceEdits) { MovieCategoryEditObject editObject = VRObjectsListObject.GetMovieCategoryEditObject(MovieCategoriesEdit.CurrentRecord.Oid); if (MovieCategoryEdit != null && MovieCategoryEdit.EditObject == editObject) { priceEdits = null; return(MovieCategoryEdit); } MovieCategoryEdit edit = new MovieCategoryEdit(editObject, this); priceEdits = new List <MovieCategoryPriceEdit>(); XPCollection <MovieCategoryPrice> prices = new XPCollection <MovieCategoryPrice>(MovieCategoriesEdit.CurrentRecord.Prices); prices.Sorting.Add(new SortProperty("[Format]", SortingDirection.Ascending)); foreach (MovieCategoryPrice price in prices) { priceEdits.Add(new MovieCategoryPriceEdit(VRObjectsListObject.GetMovieCategoryPriceEditObject(price.Oid), this)); } return(edit); }
public MovieCategoryEdit(MovieCategoryEditObject editObject, ModuleObjectDetail detail) : base(editObject, detail) { }