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(); }
//private IList<ProductStock> curBinStock { get; set; } public KitAssemblyV2Presenter(IUnityContainer container, IKitAssemblyV2View view, IShellPresenter region) { try { View = view; this.container = container; this.service = new WMSServiceClient(); this.region = region; View.Model = this.container.Resolve<KitAssemblyV2Model>(); //Event Delegate View.SearchDocument += new EventHandler<DataEventArgs<string>>(this.OnSearchDocument); View.LoadDetails += new EventHandler<DataEventArgs<Document>>(this.OnLoadDetails); View.LoadUnits += new EventHandler<DataEventArgs<Product>>(this.OnLoadUnits); View.PickComponent += new EventHandler<EventArgs>(this.OnPickComponent); View.ReceiveLabel += new EventHandler<DataEventArgs<string>>(this.OnReceivingLabel); View.ReceiveLabelList += new EventHandler<EventArgs>(this.OnReceivingLabelList); View.PickAtOnce += new EventHandler<EventArgs>(this.OnPickAtOnce); //View.LoadProducts += new EventHandler<DataEventArgs<string>>(this.OnLoadProducts); View.ChangeStatus += new EventHandler<EventArgs>(this.OnChangeStatus); //View.ReceiveLabelTrackOption += new EventHandler<EventArgs>(this.OnReceivingLabelTrackOption); //View.LoadProductManualTrackOption += new EventHandler<EventArgs>(this.OnLoadProductManualTrackOption); //View.AddManualTrackToList += new EventHandler<EventArgs>(this.OnAddManualTrackToList); //View.ReceiveManualTrack += new EventHandler<EventArgs>(this.OnReceiveManualTrack); View.SelectedUnit += new EventHandler<EventArgs>(this.OnSelectUnit); //View.RemoveManualTrack += new EventHandler<EventArgs>(this.OnRemoveManualTrack); View.ShowReceivingTicket += new EventHandler<EventArgs>(this.OnShowReceivingTicket); View.PrintLabels += new EventHandler<EventArgs>(this.OnPrintLabels); //View.LoadBins += new EventHandler<DataEventArgs<string>>(OnLoadBins); View.RemoveFromNode += new EventHandler<DataEventArgs<DocumentBalance>>(OnRemoveFromNode); View.RefreshBin +=new EventHandler<EventArgs>(OnRefreshBin); View.LateDocuments += new EventHandler<DataEventArgs<bool?>>(this.OnLateDocuments); View.NewDocument += new EventHandler<EventArgs>(this.OnNewDocument); View.ConfirmOrder += new EventHandler<EventArgs>(this.OnConfirmOrder); View.Model.Document = new Document(); View.Model.AllPicked = true; View.Model.PrinterList = App.printerList; View.Model.PrinterList.Add(new Printer { PrinterName = WmsSetupValues.DEFAULT }); //Set Node to Stored Node. (el producto pasa directo por no estar conectado a un ERP) View.Model.Node = service.GetNode(new Node { NodeID = NodeType.Process }).First(); //Cargue de Documentos LoadDocuments(); } catch (Exception ex) { Util.ShowError("Error cargando vista.\n" + ex.Message); } }
public ReceivingPresenter(IUnityContainer container, IReceivingView view, IShellPresenter region) { try { View = view; this.container = container; this.service = new WMSServiceClient(); this.region = region; View.Model = this.container.Resolve<ReceivingModel>(); //Event Delegate View.SearchDocument += new EventHandler<DataEventArgs<string>>(this.OnSearchDocument); View.LoadDetails += new EventHandler<DataEventArgs<Document>>(this.OnLoadDetails); View.LoadUnits += new EventHandler<DataEventArgs<Product>>(this.OnLoadUnits); View.ReceiveProduct += new EventHandler<EventArgs>(this.OnReceivingProduct); View.ReceiveLabel += new EventHandler<DataEventArgs<string>>(this.OnReceivingLabel); View.ReceiveLabelList += new EventHandler<EventArgs>(this.OnReceivingLabelList); View.PostReceipt += new EventHandler<EventArgs>(this.OnPostReceipt); View.ReceiptAtOnce += new EventHandler<EventArgs>(this.OnReceiptAtOnce); View.CreateEmptyReceipt += new EventHandler<EventArgs>(this.OnCreateEmptyReceipt); //View.LoadProducts += new EventHandler<DataEventArgs<string>>(this.OnLoadProducts); //View.LoadVendors += new EventHandler<DataEventArgs<string>>(this.OnLoadVendors); View.ChangeStatus += new EventHandler<EventArgs>(this.OnChangeStatus); View.ReceiveLabelTrackOption += new EventHandler<EventArgs>(this.OnReceivingLabelTrackOption); //View.LoadProductManualTrackOption += new EventHandler<EventArgs>(this.OnLoadProductManualTrackOption); //View.ReceiveManualTrack += new EventHandler<EventArgs>(this.OnReceiveManualTrack); //View.AddManualTrackToList += new EventHandler<EventArgs>(this.OnAddManualTrackToList); //View.RemoveManualTrack += new EventHandler<EventArgs>(this.OnRemoveManualTrack); View.SelectedUnit += new EventHandler<EventArgs>(this.OnSelectUnit); View.LoadPostedReceipt += new EventHandler<DataEventArgs<Document>>(this.OnLoadPostedReceipt); View.ReversePosted += new EventHandler<DataEventArgs<string>>(this.OnReversePosted); View.ShowReceivingTicket += new EventHandler<EventArgs>(this.OnShowReceivingTicket); View.GoToPrintLabels += new EventHandler<EventArgs>(this.OnGoToPrintLabels); View.LateDocuments += new EventHandler<DataEventArgs<bool?>>(this.OnLateDocuments); View.RemoveFromNode += new EventHandler<DataEventArgs<DocumentBalance>>(this.OnRemoveFromNode); View.AssignBinToProduct += new EventHandler<DataEventArgs<string>>(OnAssignBinToProduct); View.SelectPack += new EventHandler<DataEventArgs<Unit>>(OnSelectPack); //View.LoadBins += new EventHandler<DataEventArgs<string>>(OnLoadBins); View.GoToCrossDock += new EventHandler<EventArgs>(OnGoToCrossDock); View.ReceiveReturn += new EventHandler<DataEventArgs<double>>(View_ReceiveReturn); //Version Adicionada para IMAGE Services View.ReceiptAcknowledge += new EventHandler<DataEventArgs<double>>(View_ReceiptAcknowledge); // CAA [2010/05/03] View.ShowPurchaseReceive += new EventHandler<EventArgs>(this.OnShowPurchaseReceive); //Set Node to Receiving Node. Cuando se crea el PR se pasa el producto a Stored View.Model.Node = service.GetNode(new Node { NodeID = Common.NodeType.Received }).First(); //Mostrar la columna de Arrived if (Util.GetConfigOption("RECACKN").Equals("T")) { View.DgDocument.Columns["Date5"].Visible = true; //Arrived View.GBArrive.Visibility = Visibility.Visible; } //Cargue de Documentos LoadDocuments(); } catch (Exception ex) { Util.ShowError("Error loading view.\n" + ex.Message); } }