Esempio n. 1
0
        public void SaveChangesCommandHandler(object target, ExecutedRoutedEventArgs args)
        {
            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy         proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();

            proxy.Submit(remoteObjectTransferAgent);
        }
 public void Save()
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Persistence.RemoteObjectTransferAgent  remoteObjectTransferAgent = new Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_ClientOrder, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
 public void SaveChangesCommandHandler(object target, ExecutedRoutedEventArgs args)
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Persistence.RemoteObjectTransferAgent  remoteObjectTransferAgent = new Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_ClientOrder, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
 public void Save(bool releaseLock)
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy         proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_Shipment, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
        private void AddToShipment()
        {
            YellowstonePathology.Business.Persistence.ObjectTracker objectTracker = new Business.Persistence.ObjectTracker();
            objectTracker.RegisterObject(this.m_ClientOrderDetail);

            this.m_ClientOrderDetail.Shipped    = this.m_Shipment.Shipped;
            this.m_ClientOrderDetail.ShipDate   = this.m_Shipment.ShipDate;
            this.m_ClientOrderDetail.ShipmentId = this.m_Shipment.ShipmentId;
            this.m_ClientOrderDetailCollection.Add(this.m_ClientOrderDetail);

            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy         proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
            objectTracker.PrepareRemoteTransferAgent(this.m_ClientOrderDetail, remoteObjectTransferAgent);
            proxy.Submit(remoteObjectTransferAgent);
        }
        public void Submit(YellowstonePathology.Domain.ClientOrder.Model.Shipment shipment, YellowstonePathology.Persistence.ObjectTracker objectTracker)
        {
            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Persistence.SubmissionResult submissionResult = proxy.Submit(shipment, objectTracker);

            if (submissionResult.Success == false)
            {
                objectTracker.Deregister(shipment);
                objectTracker.RegisterObject(shipment);
            }
            else
            {
                System.Windows.MessageBox.Show("There was an error saving the data.");
            }
        }
        public void Submit(YellowstonePathology.Domain.ClientOrder.Model.ClientOrder clientOrder, YellowstonePathology.Persistence.ObjectTracker objectTracker)
        {
            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy            = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Persistence.SubmissionResult           submissionResult = proxy.Submit(clientOrder, objectTracker);

            if (submissionResult.Success == true)
            {
                objectTracker.Deregister(clientOrder);
                objectTracker.RegisterObject(clientOrder);
            }
            else
            {
                System.Windows.MessageBox.Show("There was an error saving the data.");
            }
        }
Esempio n. 8
0
        private void ButtonNew_Click(object sender, RoutedEventArgs e)
        {
            int    clientId = YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.PrimaryClientId;
            string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();

            YellowstonePathology.Business.ClientOrder.Model.Shipment shipment = new Business.ClientOrder.Model.Shipment(objectId, clientId, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.DisplayName,
                                                                                                                        YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.Client.ClientName);

            this.m_ObjectTracker = new Business.Persistence.ObjectTracker();
            this.m_ObjectTracker.RegisterRootInsert(shipment);

            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy         proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
            this.m_ObjectTracker.PrepareRemoteTransferAgent(shipment, remoteObjectTransferAgent);
            proxy.Submit(remoteObjectTransferAgent);

            YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailCollection clientOrderDetailCollection = new Business.ClientOrder.Model.ClientOrderDetailCollection();
            ShipmentDetailsPage shipmentDetailsPage = new ShipmentDetailsPage(shipment, clientOrderDetailCollection, this.m_ObjectTracker);

            ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(shipmentDetailsPage);
        }
Esempio n. 9
0
        private void ButtonNext_Click(object sender, RoutedEventArgs e)
        {
            if (this.Validate(true) == true)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = (YellowstonePathology.Business.PanelSet.Model.PanelSet) this.ListBoxOrderType.SelectedItem;

                YellowstonePathology.Business.ClientOrder.Model.ClientOrder specificClientOrder = YellowstonePathology.Business.ClientOrder.Model.ClientOrderFactory.GetSpecificClientOrder(panelSet);
                specificClientOrder.Join(this.m_BaseClientOrder);

                YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy submitterServiceProxy = new Proxy.SubmitterServiceProxy();
                submitterServiceProxy.InsertBaseClassOnly(specificClientOrder);
                this.m_ObjectTracker.RegisterObject(specificClientOrder);
                specificClientOrder.PanelSetId = panelSet.PanelSetId;

                YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
                this.m_ObjectTracker.PrepareRemoteTransferAgent(specificClientOrder, remoteObjectTransferAgent);
                submitterServiceProxy.Submit(remoteObjectTransferAgent);

                YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Next, specificClientOrder);
                Return(this, args);
            }
        }
Esempio n. 10
0
        private void ButtonRemove_Click(object sender, RoutedEventArgs e)
        {
            Control button = (Control)sender;

            YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem shipmentListItem = (YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem)button.Tag;
            this.SelectItemOnButtonClick(shipmentListItem);

            MessageBoxResult result = MessageBox.Show("Are you sure you want to delete this shipment?", "Delete shipment", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                this.m_ObjectTracker = new Business.Persistence.ObjectTracker();

                YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy        proxy = new Proxy.ClientOrderServiceProxy();
                YellowstonePathology.Business.ClientOrder.Model.ShipmentReturnResult shipmentReturnResult = proxy.GetShipment(shipmentListItem.ShipmentId);
                YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy          submitterProxy       = new Proxy.SubmitterServiceProxy();

                foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in shipmentReturnResult.ClientOrderDetailCollection)
                {
                    this.m_ObjectTracker.RegisterObject(clientOrderDetail);
                    clientOrderDetail.ShipDate   = null;
                    clientOrderDetail.ShipmentId = null;
                    clientOrderDetail.Shipped    = false;

                    YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
                    this.m_ObjectTracker.PrepareRemoteTransferAgent(clientOrderDetail, remoteObjectTransferAgent);
                    submitterProxy.Submit(remoteObjectTransferAgent);
                }

                this.m_ObjectTracker.RegisterRootDelete(shipmentReturnResult.Shipment);
                YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent2 = new Business.Persistence.RemoteObjectTransferAgent();
                this.m_ObjectTracker.PrepareRemoteTransferAgent(shipmentReturnResult.Shipment, remoteObjectTransferAgent2);
                submitterProxy.Submit(remoteObjectTransferAgent2);

                this.m_ShipmentListItemCollection.Remove(shipmentListItem);
            }
        }
 public void Save(bool releaseLock)
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_Shipment, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
Esempio n. 12
0
        private void ButtonNew_Click(object sender, RoutedEventArgs e)
        {
            int clientId = YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.PrimaryClientId;
            string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            YellowstonePathology.Business.ClientOrder.Model.Shipment shipment = new Business.ClientOrder.Model.Shipment(objectId, clientId, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.DisplayName,
                YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.Client.ClientName);

            this.m_ObjectTracker = new Business.Persistence.ObjectTracker();
            this.m_ObjectTracker.RegisterRootInsert(shipment);

            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
            this.m_ObjectTracker.PrepareRemoteTransferAgent(shipment, remoteObjectTransferAgent);
            proxy.Submit(remoteObjectTransferAgent);

            YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailCollection clientOrderDetailCollection = new Business.ClientOrder.Model.ClientOrderDetailCollection();
            ShipmentDetailsPage shipmentDetailsPage = new ShipmentDetailsPage(shipment, clientOrderDetailCollection, this.m_ObjectTracker);
            ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(shipmentDetailsPage);
        }
 public void Save()
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_ClientOrder, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
Esempio n. 14
0
        private void ButtonNext_Click(object sender, RoutedEventArgs e)
        {
            if (this.Validate(true) == true)
            {
                YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = (YellowstonePathology.Business.PanelSet.Model.PanelSet)this.ListBoxOrderType.SelectedItem;

                YellowstonePathology.Business.ClientOrder.Model.ClientOrder specificClientOrder = YellowstonePathology.Business.ClientOrder.Model.ClientOrderFactory.GetSpecificClientOrder(panelSet);
                specificClientOrder.Join(this.m_BaseClientOrder);

                YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy submitterServiceProxy = new Proxy.SubmitterServiceProxy();
                submitterServiceProxy.InsertBaseClassOnly(specificClientOrder);
                this.m_ObjectTracker.RegisterObject(specificClientOrder);
                specificClientOrder.PanelSetId = panelSet.PanelSetId;

                YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
                this.m_ObjectTracker.PrepareRemoteTransferAgent(specificClientOrder, remoteObjectTransferAgent);
                submitterServiceProxy.Submit(remoteObjectTransferAgent);

                YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs args = new YellowstonePathology.YpiConnect.Client.PageNavigationReturnEventArgs(YellowstonePathology.YpiConnect.Client.PageNavigationDirectionEnum.Next, specificClientOrder);
                Return(this, args);
            }
        }
 public void SaveChangesCommandHandler(object target, ExecutedRoutedEventArgs args)
 {
     YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
     YellowstonePathology.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Persistence.RemoteObjectTransferAgent();
     this.m_ObjectTracker.PrepareRemoteTransferAgent(this.m_ClientOrder, remoteObjectTransferAgent);
     proxy.Submit(remoteObjectTransferAgent);
 }
Esempio n. 16
0
        public void SaveChangesCommandHandler(object target, ExecutedRoutedEventArgs args)
        {
            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();

            proxy.Submit(remoteObjectTransferAgent);
        }
        private void AddToShipment()
        {
            YellowstonePathology.Business.Persistence.ObjectTracker objectTracker = new Business.Persistence.ObjectTracker();
            objectTracker.RegisterObject(this.m_ClientOrderDetail);

            this.m_ClientOrderDetail.Shipped = this.m_Shipment.Shipped;
            this.m_ClientOrderDetail.ShipDate = this.m_Shipment.ShipDate;
            this.m_ClientOrderDetail.ShipmentId = this.m_Shipment.ShipmentId;
            this.m_ClientOrderDetailCollection.Add(this.m_ClientOrderDetail);

            YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy proxy = new Proxy.SubmitterServiceProxy();
            YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
            objectTracker.PrepareRemoteTransferAgent(this.m_ClientOrderDetail, remoteObjectTransferAgent);
            proxy.Submit(remoteObjectTransferAgent);
        }
Esempio n. 18
0
        private void ButtonRemove_Click(object sender, RoutedEventArgs e)
        {
            Control button = (Control)sender;
            YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem shipmentListItem = (YellowstonePathology.Business.ClientOrder.Model.ShipmentListItem)button.Tag;
            this.SelectItemOnButtonClick(shipmentListItem);

            MessageBoxResult result = MessageBox.Show("Are you sure you want to delete this shipment?", "Delete shipment", MessageBoxButton.YesNo, MessageBoxImage.Question);
            if (result == MessageBoxResult.Yes)
            {
                this.m_ObjectTracker = new Business.Persistence.ObjectTracker();

                YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy proxy = new Proxy.ClientOrderServiceProxy();
                YellowstonePathology.Business.ClientOrder.Model.ShipmentReturnResult shipmentReturnResult = proxy.GetShipment(shipmentListItem.ShipmentId);
                YellowstonePathology.YpiConnect.Proxy.SubmitterServiceProxy submitterProxy = new Proxy.SubmitterServiceProxy();

                foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in shipmentReturnResult.ClientOrderDetailCollection)
                {
                    this.m_ObjectTracker.RegisterObject(clientOrderDetail);
                    clientOrderDetail.ShipDate = null;
                    clientOrderDetail.ShipmentId = null;
                    clientOrderDetail.Shipped = false;

                    YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent = new Business.Persistence.RemoteObjectTransferAgent();
                    this.m_ObjectTracker.PrepareRemoteTransferAgent(clientOrderDetail, remoteObjectTransferAgent);
                    submitterProxy.Submit(remoteObjectTransferAgent);
                }

                this.m_ObjectTracker.RegisterRootDelete(shipmentReturnResult.Shipment);
                YellowstonePathology.Business.Persistence.RemoteObjectTransferAgent remoteObjectTransferAgent2 = new Business.Persistence.RemoteObjectTransferAgent();
                this.m_ObjectTracker.PrepareRemoteTransferAgent(shipmentReturnResult.Shipment, remoteObjectTransferAgent2);
                submitterProxy.Submit(remoteObjectTransferAgent2);

                this.m_ShipmentListItemCollection.Remove(shipmentListItem);
            }
        }