Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public MovieCategoryDetail(MovieCategoryDetailObject editObject)
     : base(editObject)
 {
     MovieCategoryEdit  = new MovieCategoryEdit(VRObjectDetailEditObject.MovieCategoryEditObject, this);
     CategoryPriceEdits = GetMovieCategoryPriceEdits();
 }