예제 #1
0
        public CalibrationReport ShowNewCalibrationDialog(Instrument target)
        {
            Views.NewCalibrationDialog calibrationDialog = new Views.NewCalibrationDialog
            {
                InstrumentInstance = target
            };

            if (calibrationDialog.ShowDialog() == true)
            {
                CalibrationReport output = calibrationDialog.ReportInstance;

                _lInstData.Execute(new UpdateInstrumentCalibrationStatusCommand(target));

                _eventAggregator.GetEvent <CalibrationIssued>()
                .Publish(output);

                return(output);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public CalibrationReport ShowNewCalibrationDialog(Instrument target)
        {
            Views.NewCalibrationDialog calibrationDialog = new Views.NewCalibrationDialog
            {
                InstrumentInstance = target
            };

            if (calibrationDialog.ShowDialog() == true)
            {
                CalibrationReport output = calibrationDialog.ReportInstance;

                output.Instrument.UpdateCalibrationDueDate();
                output.Instrument.Update();

                _eventAggregator.GetEvent <CalibrationIssued>()
                .Publish(output);

                return(output);
            }
            else
            {
                return(null);
            }
        }