public ProductDepartmentView(TillDivisionGroupDepartmentModel tillDivisionGroupDepartmentModel) { InitializeComponent(); DataContext = ViewModel = new ProductDepartmentViewModel(tillDivisionGroupDepartmentModel); ViewModel.PropertyChanged += ViewModelOnPropertyChanged; Loaded += OnViewLoaded; }
public ProductGroupViewModel(TillDivisionGroupDepartmentModel tillDivisionGroupDepartmentModel) { TillDivision = tillDivisionGroupDepartmentModel.TillDivision; var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _adminDataUnit = dataUnitLocator.ResolveDataUnit<IAdminDataUnit>(); DeleteProductGroupCommand = new RelayCommand<ProductGroupModel>(DeleteProductGroupCommandExecuted); EditProductGroupCommand = new RelayCommand<ProductGroupModel>(EditProductGroupCommandExecuted); }