Beispiel #1
0
        public void StartSendRequest(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, Navigation.PageNavigator pageNavigator)
        {
            if (accessionOrder.AccessionLock.IsLockStillAquired() == true)
            {
                this.m_PageNavigator            = pageNavigator;
                this.m_PageNavigatorWasPassedIn = true;

                UI.AppMessaging.AccessionLockMessage message = new AccessionLockMessage(accessionOrder.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), accessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
                YellowstonePathology.Store.RedisServerProd1.Instance.Subscriber.Publish(message.MasterAccessionNo, JsonConvert.SerializeObject(message));
                this.ShowLockRequestSentPage(accessionOrder);
            }
            else
            {
                accessionOrder.AccessionLock.RefreshLock();
                this.RunLockAquiredActionList();

                if (this.m_MessagingDialog != null)
                {
                    this.m_MessagingDialog.Close();
                    this.m_MessagingDialog = null;
                }

                if (this.LockWasReleased != null)
                {
                    this.LockWasReleased(this, new EventArgs());
                }
            }
        }
Beispiel #2
0
        private void LockRequestPage_RequestLock(object sender, CustomEventArgs.AccessionOrderReturnEventArgs e)
        {
            if (e.AccessionOrder.AccessionLock.IsLockStillAquired() == true)
            {
                UI.AppMessaging.AccessionLockMessage message = new AccessionLockMessage(e.AccessionOrder.MasterAccessionNo, AppMessaging.AccessionLockMessage.GetMyAddress(), e.AccessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
                YellowstonePathology.Store.RedisServerProd1.Instance.Subscriber.Publish(message.MasterAccessionNo, JsonConvert.SerializeObject(message));
                this.ShowLockRequestSentPage(e.AccessionOrder);
            }
            else
            {
                e.AccessionOrder.AccessionLock.RefreshLock();
                this.RunLockAquiredActionList();

                if (this.m_MessagingDialog != null)
                {
                    this.m_MessagingDialog.Close();
                    this.m_MessagingDialog = null;
                }

                if (this.LockWasReleased != null)
                {
                    this.LockWasReleased(this, new EventArgs());
                }
            }
        }
Beispiel #3
0
        public void StartRequestReceived(System.Messaging.Message message)
        {
            if (this.m_DialogIsActive == false)
            {
                MessagingDialog messagingDialog = new MessagingDialog();
                this.m_PageNavigator    = messagingDialog.PageNavigator;
                messagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestReceivedPage lockRequestReceivedPage = new AppMessaging.LockRequestReceivedPage(message);
                messagingDialog.PageNavigator.Navigate(lockRequestReceivedPage);
                messagingDialog.Show();
                this.m_DialogIsActive = true;
            }
        }
Beispiel #4
0
        public void Start(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            if(this.m_DialogIsActive == false)
            {
                MessagingDialog messagingDialog = new MessagingDialog();
                this.m_PageNavigator = messagingDialog.PageNavigator;
                messagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestPage lockRequestPage = new AppMessaging.LockRequestPage(accessionOrder);
                lockRequestPage.RequestLock += LockRequestPage_RequestLock;

                messagingDialog.PageNavigator.Navigate(lockRequestPage);
                messagingDialog.Show();
                this.m_DialogIsActive = true;
            }
        }
Beispiel #5
0
        public void Start(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            if (this.m_DialogIsActive == false)
            {
                MessagingDialog messagingDialog = new MessagingDialog();
                this.m_PageNavigator    = messagingDialog.PageNavigator;
                messagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestPage lockRequestPage = new AppMessaging.LockRequestPage(accessionOrder);
                lockRequestPage.RequestLock += LockRequestPage_RequestLock;

                messagingDialog.PageNavigator.Navigate(lockRequestPage);
                messagingDialog.Show();
                this.m_DialogIsActive = true;
            }
        }
Beispiel #6
0
        public void Start(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            if (accessionOrder.AccessionLock.IsLockAquiredByMe == false)
            {
                if (this.m_MessagingDialog == null)
                {
                    this.m_MessagingDialog = new MessagingDialog();
                }
                this.m_MessagingDialog.Topmost = true;
                this.m_PageNavigator           = this.m_MessagingDialog.PageNavigator;
                this.m_MessagingDialog.Closed += MessagingDialog_Closed;

                UI.AppMessaging.AccessionLockMessage message         = new AccessionLockMessage(accessionOrder.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), accessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
                AppMessaging.LockRequestPage         lockRequestPage = new AppMessaging.LockRequestPage(accessionOrder);
                lockRequestPage.RequestLock += LockRequestPage_RequestLock;

                this.m_MessagingDialog.PageNavigator.Navigate(lockRequestPage);
                this.m_MessagingDialog.Show();
            }
        }
Beispiel #7
0
        public void HandleASKRecieved(Business.Test.AccessionOrder accessionOrder, AccessionLockMessage message)
        {
            if (this.m_AlwaysHoldList.Exists(e => e == System.Environment.MachineName.ToUpper()))
            {
                UI.AppMessaging.AccessionLockMessage holdMessage = new AccessionLockMessage(message.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), message.From, AccessionLockMessageIdEnum.HOLD);
                YellowstonePathology.Store.RedisServerProd1.Instance.Subscriber.Publish(holdMessage.MasterAccessionNo, JsonConvert.SerializeObject(holdMessage));
            }
            else
            {
                if (this.m_MessagingDialog == null)
                {
                    this.m_MessagingDialog = new MessagingDialog();
                }
                this.m_PageNavigator           = this.m_MessagingDialog.PageNavigator;
                this.m_MessagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestReceivedPage lockRequestReceivedPage = new AppMessaging.LockRequestReceivedPage(accessionOrder, message);
                lockRequestReceivedPage.Take += LockRequestReceivedPage_Take;
                lockRequestReceivedPage.Hold += LockRequestReceivedPage_Hold;

                this.m_MessagingDialog.PageNavigator.Navigate(lockRequestReceivedPage);
                this.m_MessagingDialog.Show();
            }
        }
Beispiel #8
0
        public void StartRequestReceived(System.Messaging.Message message)
        {
            if (this.m_DialogIsActive == false)
            {
                MessagingDialog messagingDialog = new MessagingDialog();
                this.m_PageNavigator = messagingDialog.PageNavigator;
                messagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestReceivedPage lockRequestReceivedPage = new AppMessaging.LockRequestReceivedPage(message);
                messagingDialog.PageNavigator.Navigate(lockRequestReceivedPage);
                messagingDialog.Show();
                this.m_DialogIsActive = true;
            }
        }
Beispiel #9
0
 private void MessagingDialog_Closed(object sender, EventArgs e)
 {
     this.m_MessagingDialog = null;
 }
Beispiel #10
0
 private void LockRequestPage_RequestLock(object sender, CustomEventArgs.AccessionOrderReturnEventArgs e)
 {
     if(e.AccessionOrder.AccessionLock.IsLockStillAquired() == true)
     {
         UI.AppMessaging.AccessionLockMessage message = new AccessionLockMessage(e.AccessionOrder.MasterAccessionNo, AppMessaging.AccessionLockMessage.GetMyAddress(), e.AccessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
         ISubscriber subscriber = Business.RedisConnection.Instance.GetSubscriber();
         subscriber.Publish(message.MasterAccessionNo, JsonConvert.SerializeObject(message));
         this.ShowLockRequestSentPage(e.AccessionOrder);
     }
     else
     {
         e.AccessionOrder.AccessionLock.RefreshLock();
         this.RunLockAquiredActionList();
         this.m_MessagingDialog.Close();
         this.m_MessagingDialog = null;
     }
 }
Beispiel #11
0
        public void StartSendRequest(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, Navigation.PageNavigator pageNavigator)
        {
            if (accessionOrder.AccessionLock.IsLockStillAquired() == true)
            {
                this.m_PageNavigator = pageNavigator;
                this.m_PageNavigatorWasPassedIn = true;

                UI.AppMessaging.AccessionLockMessage message = new AccessionLockMessage(accessionOrder.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), accessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
                ISubscriber subscriber = Business.RedisConnection.Instance.GetSubscriber();
                subscriber.Publish(message.MasterAccessionNo, JsonConvert.SerializeObject(message));

                this.ShowLockRequestSentPage(accessionOrder);
            }
            else
            {
                accessionOrder.AccessionLock.RefreshLock();
                this.RunLockAquiredActionList();
                this.m_MessagingDialog.Close();
                this.m_MessagingDialog = null;
            }
        }
Beispiel #12
0
        public void Start(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            if(accessionOrder.AccessionLock.IsLockAquiredByMe == false)
            {
                if(this.m_MessagingDialog == null) this.m_MessagingDialog = new MessagingDialog();
                this.m_PageNavigator = this.m_MessagingDialog.PageNavigator;
                this.m_MessagingDialog.Closed += MessagingDialog_Closed;

                UI.AppMessaging.AccessionLockMessage message = new AccessionLockMessage(accessionOrder.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), accessionOrder.AccessionLock.Address, AccessionLockMessageIdEnum.ASK);
                AppMessaging.LockRequestPage lockRequestPage = new AppMessaging.LockRequestPage(accessionOrder);
                lockRequestPage.RequestLock += LockRequestPage_RequestLock;

                this.m_MessagingDialog.PageNavigator.Navigate(lockRequestPage);
                this.m_MessagingDialog.Show();
            }
        }
Beispiel #13
0
        public void HandleASKRecieved(Business.Test.AccessionOrder accessionOrder, AccessionLockMessage message)
        {
            if (this.m_AlwaysHoldList.Exists(e => e == System.Environment.MachineName.ToUpper()))
            {
                UI.AppMessaging.AccessionLockMessage holdMessage = new AccessionLockMessage(message.MasterAccessionNo, AccessionLockMessage.GetMyAddress(), message.From, AccessionLockMessageIdEnum.HOLD);
                ISubscriber subscriber = Business.RedisConnection.Instance.GetSubscriber();
                subscriber.Publish(holdMessage.MasterAccessionNo, JsonConvert.SerializeObject(holdMessage));
            }
            else
            {
                if(this.m_MessagingDialog == null) this.m_MessagingDialog = new MessagingDialog();
                this.m_PageNavigator = this.m_MessagingDialog.PageNavigator;
                this.m_MessagingDialog.Closed += MessagingDialog_Closed;

                AppMessaging.LockRequestReceivedPage lockRequestReceivedPage = new AppMessaging.LockRequestReceivedPage(accessionOrder, message);
                lockRequestReceivedPage.Take += LockRequestReceivedPage_Take;
                lockRequestReceivedPage.Hold += LockRequestReceivedPage_Hold;

                this.m_MessagingDialog.PageNavigator.Navigate(lockRequestReceivedPage);
                this.m_MessagingDialog.Show();
            }
        }
Beispiel #14
0
 private void MessagingDialog_Closed(object sender, EventArgs e)
 {
     this.m_MessagingDialog = null;
 }