Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }