コード例 #1
0
        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);
        }
コード例 #2
0
 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();
 }
コード例 #3
0
 public CustomerCreateCmd(CatalogBase <CustomerTDTO, Customer, int> catalog, MasterDetailsViewModelBase <CustomerTDTO, Customer, int> viewModel) : base(catalog, viewModel)
 {
 }
コード例 #4
0
 public EditCommandBase(CatalogBase <TData, T, TKey> catalog, MasterDetailsViewModelBase <TData, T, TKey> viewModel)
     : base(catalog, viewModel)
 {
 }
コード例 #5
0
 public OrderDeleteCmd(CatalogBase <OrderTDTO, Order, int> catalog, MasterDetailsViewModelBase <OrderTDTO, Order, int> viewModel) : base(catalog, viewModel)
 {
 }
コード例 #6
0
 protected CommandBase(CatalogBase <TData, T, TKey> catalog, MasterDetailsViewModelBase <TData, T, TKey> viewModel)
 {
     _catalog   = catalog;
     _viewModel = viewModel;
 }