public void Update(YellowstonePathology.Business.ClientOrder.Model.ClientOrderMediaCollection clientOrderMediaCollection, string clientOrderId) { foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderMedia clientOrderMedia in clientOrderMediaCollection) { if (clientOrderMedia.ClientOrderMediaEnum == YellowstonePathology.Business.ClientOrder.Model.ClientOrderMediaEnum.Requisition) { bool found = false; foreach (CaseDocument caseDocument in this) { if (caseDocument.DocumentId == clientOrderMedia.ContainerId) { found = true; break; } } if (!found) { CaseDocument caseDocumentToAdd = new CaseDocument(); caseDocumentToAdd.ClientOrderId = clientOrderId; caseDocumentToAdd.DocumentId = clientOrderMedia.ContainerId; caseDocumentToAdd.Received = true; this.Add(caseDocumentToAdd); } } } }
public ItemsReceivedPage(YellowstonePathology.UI.Login.Receiving.ClientOrderReceivingHandler clientOrderReceivingHandler) { this.m_BarcodeScanPort = YellowstonePathology.Business.BarcodeScanning.BarcodeScanPort.Instance; this.m_ClientOrderReceivingHandler = clientOrderReceivingHandler; this.m_ClientOrderMediaCollection = new Business.ClientOrder.Model.ClientOrderMediaCollection(); this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.LoadMedia(this.m_ClientOrderMediaCollection); InitializeComponent(); DataContext = this; Loaded += new RoutedEventHandler(ItemsReceivedPage_Loaded); Unloaded += new RoutedEventHandler(ItemsReceivedPage_Unloaded); }
public ItemsReceivedPage(YellowstonePathology.UI.Login.Receiving.ClientOrderReceivingHandler clientOrderReceivingHandler) { this.m_BarcodeScanPort = YellowstonePathology.Business.BarcodeScanning.BarcodeScanPort.Instance; this.m_ClientOrderReceivingHandler = clientOrderReceivingHandler; this.m_ClientOrderMediaCollection = new Business.ClientOrder.Model.ClientOrderMediaCollection(); this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.LoadMedia(this.m_ClientOrderMediaCollection); InitializeComponent(); DataContext = this; Loaded += new RoutedEventHandler(ItemsReceivedPage_Loaded); Unloaded += new RoutedEventHandler(ItemsReceivedPage_Unloaded); }
public void LoadMedia(YellowstonePathology.Business.ClientOrder.Model.ClientOrderMediaCollection clientOrderMediaCollection) { foreach (ClientOrderDetail clientOrderDetail in this) { ClientOrderMedia clientOrderMedia = new ClientOrderMedia(clientOrderDetail.ContainerId); clientOrderMedia.ClientOrderDetailId = clientOrderDetail.ClientOrderDetailId; clientOrderMedia.CollectionDate = clientOrderDetail.CollectionDate; clientOrderMedia.ClientFixation = clientOrderDetail.ClientFixation; clientOrderMedia.Description = clientOrderDetail.Description; clientOrderMedia.DescriptionToAccession = clientOrderDetail.DescriptionToAccession; clientOrderMedia.SpecimenNumber = clientOrderDetail.SpecimenNumber.ToString(); clientOrderMedia.LabFixation = clientOrderDetail.LabFixation; clientOrderMedia.Received = clientOrderDetail.Received; clientOrderMediaCollection.Add(clientOrderMedia); } }
private void HyperLinkDeleteSpecimen_Click(object sender, RoutedEventArgs e) { Hyperlink hyperLink = (Hyperlink)e.Source; YellowstonePathology.Business.ClientOrder.Model.ClientOrderMedia clientOrderMedia = (YellowstonePathology.Business.ClientOrder.Model.ClientOrderMedia)hyperLink.Tag; YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail = this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.GetByClientOrderDetailId(clientOrderMedia.ClientOrderDetailId); MessageBoxResult messageBoxResult = MessageBox.Show("Are you sure you want to delete this specimen?", "Delete?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes); if (messageBoxResult == MessageBoxResult.Yes) { this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.Remove(clientOrderDetail); this.m_ClientOrderMediaCollection = new Business.ClientOrder.Model.ClientOrderMediaCollection(); this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.LoadMedia(this.m_ClientOrderMediaCollection); this.NotifyPropertyChanged("ClientOrderMediaCollection"); } }
private void HyperLinkDeleteSpecimen_Click(object sender, RoutedEventArgs e) { Hyperlink hyperLink = (Hyperlink)e.Source; YellowstonePathology.Business.ClientOrder.Model.ClientOrderMedia clientOrderMedia = (YellowstonePathology.Business.ClientOrder.Model.ClientOrderMedia)hyperLink.Tag; YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail = this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.GetByClientOrderDetailId(clientOrderMedia.ClientOrderDetailId); MessageBoxResult messageBoxResult = MessageBox.Show("Are you sure you want to delete this specimen?", "Delete?", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes); if (messageBoxResult == MessageBoxResult.Yes) { this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.Remove(clientOrderDetail); this.m_ClientOrderReceivingHandler.Save(false); this.m_ClientOrderMediaCollection = new Business.ClientOrder.Model.ClientOrderMediaCollection(); this.m_ClientOrderReceivingHandler.ClientOrder.ClientOrderDetailCollection.LoadMedia(this.m_ClientOrderMediaCollection); this.NotifyPropertyChanged("ClientOrderMediaCollection"); } }