예제 #1
0
        private void ShowShippingDetailsPage(string shipmentId)
        {
            YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy        proxy = new Proxy.ClientOrderServiceProxy();
            YellowstonePathology.Business.ClientOrder.Model.ShipmentReturnResult shipmentReturnResult = proxy.GetShipment(shipmentId);

            this.m_ObjectTracker = new Business.Persistence.ObjectTracker();
            this.m_ObjectTracker.RegisterObject(shipmentReturnResult.Shipment);
            ShipmentDetailsPage shipmentDetailsPage = new ShipmentDetailsPage(shipmentReturnResult.Shipment, shipmentReturnResult.ClientOrderDetailCollection, this.m_ObjectTracker);

            ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(shipmentDetailsPage);
        }
예제 #2
0
        private void ShowShippingDetailsPage(string shipmentId)
        {
            YellowstonePathology.YpiConnect.Proxy.ClientOrderServiceProxy proxy = new Proxy.ClientOrderServiceProxy();
            YellowstonePathology.Business.ClientOrder.Model.ShipmentReturnResult shipmentReturnResult = proxy.GetShipment(shipmentId);

            this.m_ObjectTracker = new Business.Persistence.ObjectTracker();
            this.m_ObjectTracker.RegisterObject(shipmentReturnResult.Shipment);
            ShipmentDetailsPage shipmentDetailsPage = new ShipmentDetailsPage(shipmentReturnResult.Shipment, shipmentReturnResult.ClientOrderDetailCollection, this.m_ObjectTracker);
            ApplicationNavigator.ApplicationContentFrame.NavigationService.Navigate(shipmentDetailsPage);
        }
예제 #3
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);
            }
        }
예제 #4
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);
            }
        }