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(); }
/// <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); } } }