Ejemplo n.º 1
0
        public CrossDockPresenter(IUnityContainer container, ICrossDockView view, IShellPresenter region)
        {
            View = view;
            this.container = container;
            this.service = new WMSServiceClient();
            this.region = region;
            View.Model = this.container.Resolve<CrossDockModel>();

            //Event Delegate
            View.ProcessPending += new EventHandler<DataEventArgs<int>>(OnProcessPending);
            View.RemoveFromList += new EventHandler<EventArgs>(this.OnRemoveFromList);
            View.AddDocumentToAssigned += new EventHandler<EventArgs>(OnAddDocumentToAssigned);
            View.SearchDocument += new EventHandler<DataEventArgs<string>>(this.OnSearchDocument);
            View.CrossDockPreview += new EventHandler<EventArgs>(OnCrossDockPreview);
            View.ConfirmCrossDock += new EventHandler<EventArgs>(OnConfirmCrossDock);
            View.SearchHistDocument += new EventHandler<DataEventArgs<string>>(this.OnSearchHistDocument);
            View.LoadDetails += new EventHandler<DataEventArgs<Document>>(OnLoadDetails);
            View.ShowTicket += new EventHandler<EventArgs>(OnShowTicket);
            View.ShowCrossDockDocuments += new EventHandler<EventArgs>(OnShowCrossDockDocuments);

            View.Model.AnyReceived = false;

            PutAway = service.GetBinLocation("", true);


            //Si  hay conexion a ERP se habilita el panel de posting
            //if (App.IsConnectedToErpReceving)
                View.Model.Node = service.GetNode(new Node { NodeID = Common.NodeType.Received }).First();
            //else
                //View.Model.Node = service.GetNode(new Node { NodeID = Common.NodeType.Stored }).First();


            //ShowProcessPanel();
         }