Example #1
0
        private void View_EditInspectionResult(object sender,
                                               SingleChoiceActionRequestEventArgs
                                               <StationInspectionTaskResult>
                                               e)
        {
            StationInspectionTaskModel model =
                new StationInspectionTaskModel(e.ActionItem);

            IStationInspectionTaskView view = View.InspectionTaskView;

            StationInspectionTaskController controller =
                new StationInspectionTaskController(model, view);

            View.ShowInspectionTaskView();
        }
Example #2
0
        /// <summary>
        /// Creates a inspection result
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void View_CreateInspectionResult(object sender,
                                                 ActionRequestEventArgs e)
        {
            StationInspectionTaskModel model =
                new StationInspectionTaskModel(Model.Process);

            IStationInspectionTaskView view = View.InspectionTaskView;

            StationInspectionTaskController controller =
                new StationInspectionTaskController(model, view);

            using (controller)
            {
                View.ShowInspectionTaskView();

                if (model.TaskResult != null &&
                    model.TaskResult.Outcome != StationTaskOutcome.NotPerformed)
                {
                    Model.InspectionResults.Add(model.TaskResult);
                }
            }
        }