public void AssignScreenings(List <YellowstonePathology.Business.Search.CytologyScreeningSearchResult> cytologyScreeningSearchResults, YellowstonePathology.Business.User.SystemUser systemUser) { YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new Business.Rules.ExecutionStatus(); foreach (YellowstonePathology.Business.Search.CytologyScreeningSearchResult cytologyScreeningSearchResult in cytologyScreeningSearchResults) { YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(cytologyScreeningSearchResult.MasterAccessionNo, this.m_Writer); if (accessionOrder.AccessionLock.IsLockAquiredByMe == true) { YellowstonePathology.Business.Rules.Cytology.AssignScreening assignScreening = new YellowstonePathology.Business.Rules.Cytology.AssignScreening(this.m_Writer); assignScreening.Execute(cytologyScreeningSearchResult.MasterAccessionNo, systemUser.UserId, executionStatus); } else { YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPAP(); executionStatus.AddMessage(panelSetOrder.ReportNo + " was not assigned as it is locked.", false); } YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(accessionOrder, this.m_Writer); } if (executionStatus.ExecutionMessages.Count > 0) { YellowstonePathology.Business.Rules.ExecutionStatusDialog executionStatusDialog = new Business.Rules.ExecutionStatusDialog(executionStatus); executionStatusDialog.ShowDialog(); } this.LoadDataByReportNo(this.m_PanelSetOrderCytology.ReportNo); }
private void HyperlinkSubmit_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new Business.Rules.ExecutionStatus(); Rules.ClientOrderValidation clientOrderValidation = new Rules.ClientOrderValidation(executionStatus); clientOrderValidation.Execute(this.m_ClientOrder); if (executionStatus.Halted == false) { this.m_ClientOrder.Submitted = true; this.m_ClientOrder.ClientOrderDetailCollection.MarkAsSubmitted(); Save(); Shared.PageNavigationReturnEventArgs args = new Shared.PageNavigationReturnEventArgs(Shared.PageNavigationDirectionEnum.Back, null); Return(this, args); } else { YellowstonePathology.Business.Rules.ExecutionStatusDialog executionStatusDialog = new Business.Rules.ExecutionStatusDialog(executionStatus); executionStatusDialog.ShowDialog(); } }
public void AssignScreenings(List<YellowstonePathology.Business.Search.CytologyScreeningSearchResult> cytologyScreeningSearchResults, YellowstonePathology.Business.User.SystemUser systemUser) { YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new Business.Rules.ExecutionStatus(); foreach (YellowstonePathology.Business.Search.CytologyScreeningSearchResult cytologyScreeningSearchResult in cytologyScreeningSearchResults) { YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(cytologyScreeningSearchResult.MasterAccessionNo, this.m_Writer); if (accessionOrder.AccessionLock.IsLockAquiredByMe == true) { YellowstonePathology.Business.Rules.Cytology.AssignScreening assignScreening = new YellowstonePathology.Business.Rules.Cytology.AssignScreening(this.m_Writer); assignScreening.Execute(cytologyScreeningSearchResult.MasterAccessionNo, systemUser.UserId, executionStatus); } else { YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPAP(); executionStatus.AddMessage(panelSetOrder.ReportNo + " was not assigned as it is locked.", false); } YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(accessionOrder, this.m_Writer); } if (executionStatus.ExecutionMessages.Count > 0) { YellowstonePathology.Business.Rules.ExecutionStatusDialog executionStatusDialog = new Business.Rules.ExecutionStatusDialog(executionStatus); executionStatusDialog.ShowDialog(); } this.LoadDataByReportNo(this.m_PanelSetOrderCytology.ReportNo); }
private void HyperlinkSubmit_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Rules.ExecutionStatus executionStatus = new Business.Rules.ExecutionStatus(); Rules.ClientOrderValidation clientOrderValidation = new Rules.ClientOrderValidation(executionStatus); clientOrderValidation.Execute(this.m_ClientOrder); if (executionStatus.Halted == false) { this.m_ClientOrder.Submitted = true; this.m_ClientOrder.ClientOrderDetailCollection.MarkAsSubmitted(); Save(false); YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Back, null); Return(this, args); } else { YellowstonePathology.Business.Rules.ExecutionStatusDialog executionStatusDialog = new Business.Rules.ExecutionStatusDialog(executionStatus); executionStatusDialog.ShowDialog(); } }