public DespachosPresenter(IUnityContainer container, IDespachosView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve <DespachosModel>(); #region Metodos #region Header View.CargarHeader += new EventHandler <DataEventArgs <Bin> >(this.OnCargarHeader); View.ConfirmBasicData += new EventHandler <EventArgs>(this.OnConfirmBasicData); View.CancelBasicData += new EventHandler <EventArgs>(this.OnCancelBasicData); View.NewBasicData += new EventHandler <EventArgs>(this.OnNewBasicData); #endregion #region Serial View.AddLine += new EventHandler <EventArgs>(this.OnAddLine); #endregion #region Details View.SaveDetails += new EventHandler <EventArgs>(this.OnSaveDetails); #endregion #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinDespachosAlmacen = service.GetBin(new Bin { LevelCode = "D", Location = View.Model.RecordCliente }); //BinDespachos = service.GetBin(new Bin { BinCode = View.Model.RecordCliente.AddressLine2, Location = View.Model.RecordCliente }).First(); ProductDefault = service.GetProduct(new Product { ProductCode = WmsSetupValues.DEFAULT }).First(); LocationDespachos = service.GetLocation(new Location { ErpCode = "DESPACHOS" }).First(); View.Model.ListLabelScann = new List <WpfFront.WMSBusinessService.Label>(); View.Model.ListDataInformation = new List <DataInformation>(); //CargarDatosHeader(); #endregion }
public DespachosPresenter(IUnityContainer container, IDespachosView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<DespachosModel>(); #region Metodos #region Header View.CargarHeader += new EventHandler<DataEventArgs<Bin>>(this.OnCargarHeader); View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.CancelBasicData += new EventHandler<EventArgs>(this.OnCancelBasicData); View.NewBasicData += new EventHandler<EventArgs>(this.OnNewBasicData); #endregion #region Serial View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); #endregion #region Details View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); #endregion #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinDespachosAlmacen = service.GetBin(new Bin { LevelCode = "D", Location = View.Model.RecordCliente }); //BinDespachos = service.GetBin(new Bin { BinCode = View.Model.RecordCliente.AddressLine2, Location = View.Model.RecordCliente }).First(); ProductDefault = service.GetProduct(new Product { ProductCode = WmsSetupValues.DEFAULT }).First(); LocationDespachos = service.GetLocation(new Location { ErpCode = "DESPACHOS" }).First(); View.Model.ListLabelScann = new List<WpfFront.WMSBusinessService.Label>(); View.Model.ListDataInformation = new List<DataInformation>(); //CargarDatosHeader(); #endregion }