예제 #1
0
 private void HyperLinkDeletePanelSetOrder_Click(object sender, RoutedEventArgs e)
 {
     Business.Test.PanelSetOrder panelSetOrder = ((Hyperlink)sender).Tag as Business.Test.PanelSetOrder;
     if (this.m_AccessionOrder.AccessionLock.IsLockAquiredByMe == true)
     {
         if (this.m_AccessionOrder.PanelSetOrderCollection.Count == 1)
         {
             MessageBox.Show("Unable to remove the only Panel Set for the Accession.");
         }
         else if ((this.m_AccessionOrder.PLastName.ToUpper() == "MOUSE" && this.m_AccessionOrder.PFirstName.ToUpper() == "MICKEY") ||
                  panelSetOrder.Final == false)
         {
             MessageBoxResult result = MessageBox.Show("All open tabs will be closed and your work saved.  Are you sure you want to permanently delete report " + panelSetOrder.ReportNo + " for " + this.m_AccessionOrder.PatientDisplayName + "?", "Delete Report", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
             if (result == MessageBoxResult.Yes)
             {
                 bool closeResult = this.CloseTabs(this, EventArgs.Empty);
                 Business.Rules.MethodResult methodResult = AORemover.RemovePanelSet(panelSetOrder.ReportNo, this.m_AccessionOrder, this.m_Writer);
                 if (methodResult.Success == false)
                 {
                     MessageBox.Show(methodResult.Message);
                 }
                 else
                 {
                     this.m_AccessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(this.m_AccessionOrder.MasterAccessionNo, this.m_Writer);
                     this.NotifyPropertyChanged("AccessionOrder");
                 }
             }
         }
         else
         {
             MessageBox.Show("Unable to remove a Panel Set that has been finaled.");
         }
     }
     else
     {
         System.Windows.MessageBox.Show("Unable to delete as the case is locked by " + this.m_AccessionOrder.AccessionLock.Address + ".", "Case is locked");
     }
 }
예제 #2
0
 private void HyperLinkDeleteAccessionOrder_Click(object sender, RoutedEventArgs e)
 {
     if (this.m_AccessionOrder.AccessionLock.IsLockAquiredByMe == true)
     {
         MessageBoxResult result = MessageBox.Show("All open tabs will be closed and your work saved.  Are you sure you want to permanently delete Accession " + this.m_AccessionOrder.MasterAccessionNo + " for " + this.m_AccessionOrder.PatientDisplayName + "?", "Delete Accession", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
         if (result == MessageBoxResult.Yes)
         {
             bool tabsClosedResult = this.CloseTabs(this, EventArgs.Empty);
             Business.Rules.MethodResult methodResult = AORemover.Remove(this.m_AccessionOrder, this.m_Writer);
             if (methodResult.Success == false)
             {
                 MessageBox.Show(methodResult.Message);
             }
             else
             {
                 this.Back(this, new EventArgs());
             }
         }
     }
     else
     {
         System.Windows.MessageBox.Show("Unable to delete as the case is locked by " + this.m_AccessionOrder.AccessionLock.Address + ".", "Case is locked");
     }
 }