Esempio n. 1
0
        private void ExecuteCancelCommand()
        {
            _windowService.CloseModalWindow(WindowType.UnloadCorrectionWindow);
            _windowService.CloseModalWindow(WindowType.WaitingForUnloadWindow);

            LoadingIncorrectModuleViewModel incorrectModuleVM = SimpleIoc.Default.GetInstance <LoadingIncorrectModuleViewModel>();

            incorrectModuleVM.ActiveListID = this.ActiveListID;
            incorrectModuleVM.ListName     = this.ListName;
            incorrectModuleVM.Client       = this.Client;
            incorrectModuleVM.Farm         = this.Farm;
            incorrectModuleVM.Field        = this.Field;

            var    module = BadSerials.LastOrDefault();
            string serial = module != null ? module.SerialNumber : "--";

            incorrectModuleVM.Initialize(true);
            foreach (var s in AggregateDataProvider.SerialNumbersOnTruck)
            {
                incorrectModuleVM.NewModuleLoaded(s, false);
            }
            //incorrectModuleVM.NewModuleLoaded(msg.SerialNumber, moduleOnList);
            _windowService.ShowModalWindow(WindowType.LoadingIncorrectModuleWindow, incorrectModuleVM);
            //Messenger.Default.Send<ManualUnloadCorrectionMessage>(new ManualUnloadCorrectionMessage());
        }