public List <ItemViewModelBase <T, TKey> > GetItemViewModelCollection(CatalogBase <TData, T, TKey> catalog) { List <ItemViewModelBase <T, TKey> > items = new List <ItemViewModelBase <T, TKey> >(); foreach (T obj in catalog.All) { items.Add(CreateItemViewModel(obj)); } return(items); }
protected MasterDetailsViewModelBase( CatalogBase <TData, T, TKey> catalog, ViewModelFactoryBase <TData, T, TKey> factory) { _catalog = catalog; _factory = factory; _itemViewModelSelected = null; _dataPackage = new TData(); _deleteCommand = new DeleteCommandBase <TData, T, TKey>(_catalog, this); _createCommand = new CreateCommandBase <TData, T, TKey>(_catalog, this); _editCommand = new EditCommandBase <TData, T, TKey>(_catalog, this); _catalog.Load(); }
public CustomerCreateCmd(CatalogBase <CustomerTDTO, Customer, int> catalog, MasterDetailsViewModelBase <CustomerTDTO, Customer, int> viewModel) : base(catalog, viewModel) { }
public EditCommandBase(CatalogBase <TData, T, TKey> catalog, MasterDetailsViewModelBase <TData, T, TKey> viewModel) : base(catalog, viewModel) { }
public OrderDeleteCmd(CatalogBase <OrderTDTO, Order, int> catalog, MasterDetailsViewModelBase <OrderTDTO, Order, int> viewModel) : base(catalog, viewModel) { }
protected CommandBase(CatalogBase <TData, T, TKey> catalog, MasterDetailsViewModelBase <TData, T, TKey> viewModel) { _catalog = catalog; _viewModel = viewModel; }