private void AddCommandHandler() { _currentCommand = Definitions.Enumeration.Commands.AddCategory; InitializeNewCategory(); NewCategoryFormVisibility = true; EnableCategoryList = false; }
public CategoryRegistrationViewModel(IUnityContainer container) { // Resolve services _regionManager = container.Resolve <IRegionManager>(); _categoryService = container.Resolve <ICategoryService>(); _eventAggregator = container.Resolve <IEventAggregator>(); // Get data from Database Initialization = InitializeCategoryListAsync(); CategoryListView.MoveCurrentToFirst(); _title = "-Product Management Category Title-"; _currentCommand = CompleetKassa.Module.ProductManagement.Definitions.Enumeration.Commands.None; NewCategoryFormVisibility = false; EnableCategoryList = true; ReadOnlyNewCategoryForm = true; SetCategoryValidationRules(); // Event Handler OnFirstCommand = new DelegateCommand(FirstCommandHandler); OnPreviousCommand = new DelegateCommand(PreviousCommandHandler); OnNextCommand = new DelegateCommand(NextCommandHandler); OnLastCommand = new DelegateCommand(LastCommandHandler); OnAddCommand = new DelegateCommand(AddCommandHandler); OnEditCategoryCommand = new DelegateCommand <CategoryModel>(EditCategoryCommandHandler); OnSaveCommand = new DelegateCommand(SaveCommandHandler); OnDeleteCategoryCommand = new DelegateCommand <CategoryModel>(DeleteCategoryCommandHandler); OnCancelCommand = new DelegateCommand(CancelCommandHandler); OnCloseCommand = new DelegateCommand(CloseCommandHandler); }
private void EditCategoryCommandHandler(CategoryModel category) { _currentCommand = Definitions.Enumeration.Commands.EditCategory; EnableCategoryList = false; ReadOnlyNewCategoryForm = false; }