private void ButtonOK_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Rules.PanelSetOrder.ReassignCase reassignCase = new YellowstonePathology.Business.Rules.PanelSetOrder.ReassignCase(); YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new YellowstonePathology.Business.Rules.ExecutionStatus(); reassignCase.Execute(executionStatus, this.m_PanelSetOrder, CreateAmendment, this.m_SystemIdentity); if (executionStatus.Halted) { YellowstonePathology.Business.Rules.RuleExecutionStatus ruleExecutionStatus = new YellowstonePathology.Business.Rules.RuleExecutionStatus(); ruleExecutionStatus.PopulateFromLinqExecutionStatus(executionStatus); RuleExecutionStatusDialog ruleExecutionStatusDialog = new RuleExecutionStatusDialog(ruleExecutionStatus); ruleExecutionStatusDialog.ShowDialog(); return; } Close(); }
private void ButtonReassignCase_Click(object sender, RoutedEventArgs e) { if (this.PanelSetOrderSurgical != null) { YellowstonePathology.Business.Rules.PanelSetOrder.ReassignCase reassignCase = new YellowstonePathology.Business.Rules.PanelSetOrder.ReassignCase(); YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new YellowstonePathology.Business.Rules.ExecutionStatus(); if (this.PanelSetOrderSurgical.Final == false) { MessageBoxResult messageBoxResult = MessageBox.Show("An amendment will be created as a result of reasigning this case. Are you sure you want to proceed with reasignment?", "Proceed?", MessageBoxButton.YesNo, MessageBoxImage.Question); if (messageBoxResult == MessageBoxResult.Yes) { reassignCase.Execute(executionStatus, this.m_PathologistUI.AccessionOrder, this.PanelSetOrderSurgical, true, Business.User.SystemIdentity.Instance); } } else { reassignCase.Execute(executionStatus, this.m_PathologistUI.AccessionOrder, this.PanelSetOrderSurgical, false, Business.User.SystemIdentity.Instance); if (executionStatus.Halted == false) { MessageBox.Show("The case has been reassigned"); } } } }