Ejemplo n.º 1
0
        public void restartBusinessUnitCommand()
        {
            var businessAreasViewController = new BusinessAreasViewController(socket, this);

            fleetManagementViewModel.ActiveViewModel = businessAreasViewController.Initialize();

            fleetManagementViewModel.NewCommand    = new RelayCommand(businessAreasViewController.ExecuteNewBusinessAreaCommand);
            fleetManagementViewModel.SaveCommand   = new RelayCommand(businessAreasViewController.ExecuteSaveBusinessAreaCommand);
            fleetManagementViewModel.DeleteCommand = new RelayCommand(businessAreasViewController.ExecuteDeleteBusinessAreaCommand, businessAreasViewController.CanExecuteDeleteCommand);
        }
Ejemplo n.º 2
0
        private void ExecuteOpenBusinessAreasCommand(object obj)
        {
            var businessAreasViewController = new BusinessAreasViewController();

            fleetManagementViewModel.NewCommand    = new RelayCommand(ExecuteNewBusinessAreaCommand);
            fleetManagementViewModel.SaveCommand   = new RelayCommand(ExecuteSaveBusinessAreaCommand);
            fleetManagementViewModel.DeleteCommand = new RelayCommand(ExecuteDeleteBusinessAreaCommand);

            fleetManagementViewModel.ActiveViewModel = businessAreasViewController.Initialize();
            (fleetManagementViewModel.ActiveViewModel as BusinessAreasViewModel).BusinessAreas = new ObservableCollection <BusinessUnit>(socket.GetAllBusinessUnits());

            //Persist Entry State BusinessAreas
            (fleetManagementViewModel.ActiveViewModel as BusinessAreasViewModel).entryBusinessArea = (fleetManagementViewModel.ActiveViewModel as BusinessAreasViewModel).BusinessAreas.ToList();
        }