private void ListBoxOrderType_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox listBox = (ListBox)sender; string selectedOrderType = (string)listBox.SelectedItem; if (selectedOrderType == "Immediate Exam (with frozen section)" || selectedOrderType == "Immediate Exam (without frozen section)") { ClientOrderDetailView clientOrderDetailView = (ClientOrderDetailView)this.ListBoxSpecimen.SelectedItem; if (string.IsNullOrEmpty(clientOrderDetailView.ClientOrderDetail.CallbackNumber) == true) { CallbackNumberDialog callbackNumberDialog = new CallbackNumberDialog(); Nullable <bool> result = callbackNumberDialog.ShowDialog(); if (result == true) { foreach (YellowstonePathology.Domain.ClientOrder.Model.ClientOrderDetail clientOrderDetail in this.m_ClientOrder.ClientOrderDetailCollection) { if (string.IsNullOrEmpty(clientOrderDetail.CallbackNumber) == true) { clientOrderDetail.CallbackNumber = callbackNumberDialog.CallbackNumber; } } } } } }
private void ListViewSpecimen_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (this.ListViewSpecimen.SelectedItem != null) { ClientOrderDetailView clientOrderDetailView = (ClientOrderDetailView)this.ListViewSpecimen.SelectedItem; YellowstonePathology.Domain.ClientOrder.Model.ClientOrderDetail clientOrderDetail = clientOrderDetailView.ClientOrderDetail; this.StartSpecimenOrderEntryPath(clientOrderDetail, ClientOrderDetailWizardModeEnum.EditExisting); } }
private void ButtonDeleteSpecimen_Click(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Are you sure you want to delete this specimen?", "Delete specimen", MessageBoxButton.OKCancel); if (result == MessageBoxResult.OK) { if (this.ListBoxSpecimen.SelectedItems.Count != 0) { Hyperlink hyperlink = (Hyperlink)sender; ClientOrderDetailView clientOrderDetailView = (ClientOrderDetailView)hyperlink.Tag; YellowstonePathology.Business.Rules.ExecutionMessage executionMessage = new Business.Rules.ExecutionMessage(); this.m_ClientOrder.ClientOrderDetailCollection.ClientRequestDeleteSpecimen(clientOrderDetailView.ClientOrderDetail, this.m_ClientOrder, executionMessage); this.m_ClientOrderDetailViewCollection.Reload(this.m_ShowInactiveSpecimen); MessageBox.Show(executionMessage.Message); } } }