private void OpenSelectedRecord()
        {
            var clientOverviewViewModel = new ClientOverviewViewModel();
            var deviceOverviewViewModel = UnityConfiguration.Resolve <DeviceOverviewViewModel>();
            var reportOverviewViewModel = UnityConfiguration.Resolve <ReportOverviewViewModel>();

            clientOverviewViewModel.LoadClient((SelectedItems?.FirstOrDefault() as ClientViewModel).Id);

            clientOverviewViewModel.DeviceSelected += deviceOverviewViewModel.OnDeviceSelected;
            deviceOverviewViewModel.RecordSelected += reportOverviewViewModel.OnRecordSelected;

            new OverviewView(clientOverviewViewModel, deviceOverviewViewModel, reportOverviewViewModel)
            .Show();
        }
Beispiel #2
0
        private void ShowDetails()
        {
            var device = _deviceService.GetDevice((SelectedItems.FirstOrDefault() as DeviceRowView)?.SerialNumber);

            var clientOverviewViewModel = new ClientOverviewViewModel(device.NrFabryczny);
            var deviceOverviewViewModel = UnityConfiguration.Resolve <DeviceOverviewViewModel>();
            var reportOverviewViewModel = UnityConfiguration.Resolve <ReportOverviewViewModel>();

            clientOverviewViewModel.LoadClient(device.IdKlient);

            clientOverviewViewModel.DeviceSelected += deviceOverviewViewModel.OnDeviceSelected;
            deviceOverviewViewModel.RecordSelected += reportOverviewViewModel.OnRecordSelected;

            new OverviewView(clientOverviewViewModel, deviceOverviewViewModel, reportOverviewViewModel)
            .Show();
        }