public BinPresenter(IUnityContainer container, IBinView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<BinModel>(); //Event Delegate View.LoadSearch += new EventHandler<DataEventArgs<string>>(this.OnLoadSearch); View.New += new EventHandler<EventArgs>(this.OnNew); View.LoadData += new EventHandler<DataEventArgs<Bin>>(this.OnLoadData); View.Save += new EventHandler<EventArgs>(this.OnSave); View.Delete += new EventHandler<EventArgs>(this.OnDelete); ProcessWindow pw = new ProcessWindow("Loading ..."); View.Model.EntityList = service.GetBin(new Bin()); View.Model.Record = null; //List Height View.ListRecords.MaxHeight = SystemParameters.FullPrimaryScreenHeight - 250; pw.Close(); }
public AdministradorPresenter(IUnityContainer container, IAdministradorView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<AdministradorModel>(); #region Metodos //View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); View.CargarDatosAdministrador += new EventHandler<EventArgs>(this.CargarDatosAdministrador); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.ReiniciarCapacitacion += new EventHandler<EventArgs>(this.OnReiniciarCapacitacion); View.ConsultarMovimientos += new EventHandler<EventArgs>(this.OnConsultarMovimientos); View.BuscarEquipoTracking += new EventHandler<EventArgs>(this.OnBuscarEquipoTracking); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.BuscarNombreMaterial += this.OnBuscarNombreMaterial; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListadoEstatusLogPro = service.GetMMaster(new MMaster { MetaType = new MType { Code = "LOGPROSTAT" } }); View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); //View.Model.ListadoModelos = service.GetMMaster(new MMaster { MetaType = new MType { Code = "DRIRECMODE" } }); View.Model.ListadoOrigen = service.GetMMaster(new MMaster { MetaType = new MType { Code = "ALIADO" } }); View.Model.ListadoTipoOrigen = service.GetMMaster(new MMaster { MetaType = new MType { Code = "REMISIONRR" } }); View.Model.ListadoTipoREC = service.GetMMaster(new MMaster { MetaType = new MType { Code = "REC" } }); View.Model.ListadoFallas = service.GetMMaster(new MMaster { MetaType = new MType { Code = "FALLADIA" } }); View.Model.ListadoMotScrap = service.GetMMaster(new MMaster { MetaType = new MType { Code = "MOTSCRAP" } }); View.Model.ListadoEstadoRR = service.GetMMaster(new MMaster { MetaType = new MType { Code = "ESTADO RR" } }); View.Model.ListadoProductos = service.GetProduct(new Product()); View.Model.ListadoEquipos = service.DirectSQLQuery("exec sp_GetProcesos2 'HISTORICOSERIAL'", "", "dbo.movimientoclaro", Local); #endregion }
public AdminInformationPresenter(IUnityContainer container, IAdminInformationView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<AdminInformationModel>(); #region Metodos #region Busqueda View.LoadData += new EventHandler<DataEventArgs<ClassEntity>>(this.OnLoadData); View.ShowFields += new EventHandler<DataEventArgs<ClassEntity>>(this.OnShowFields); #endregion #region Datos Estaticos View.AsignarProducto += new EventHandler<DataEventArgs<Product>>(this.OnAsignarProducto); View.CargarDatos += new EventHandler<DataEventArgs<Location>>(this.OnCargarDatos); #endregion #region Datos Generales #endregion #region Eventos Botones View.UpdateData += new EventHandler<EventArgs>(this.OnUpdateData); View.DeleteData += new EventHandler<EventArgs>(this.OnDeleteData); #endregion #endregion #region Datos //Obtengo el cliente View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); //Obtengo las opciones de Documento y Label View.Model.SearchTypeList = service.GetClassEntity(new ClassEntity()) .Where(f => f.ClassEntityID == EntityID.Document || f.ClassEntityID == EntityID.Label).ToList(); //Obtengo las ubicaciones del cliente View.Model.BinList = service.GetBin(new Bin { Location = View.Model.RecordCliente }); //Consulto los productos definidos para el cliente //View.Model.ProductsLocationList = service.GetProduct(new Product { Reference = View.Model.RecordCliente.LocationID.ToString() }); //View.Model.ProductsLocationList.Insert(0, service.GetProduct(new Product { ProductCode = WmsSetupValues.DEFAULT }).First()); //Obtengo los estados de los equipos View.Model.StatusList = App.EntityStatusList; #endregion }
public DiagnosticoPresenter(IUnityContainer container, IDiagnosticoView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<DiagnosticoModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.GenerarCodigo += new EventHandler<EventArgs>(this.OnGenerarCodigo); //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.ReplicateDetailsBy_Column += new EventHandler<RoutedEventArgs>(this.OnReplicateDetailsBy_Column); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.ConfirmarImpresion += new EventHandler<EventArgs>(this.OnConfirmarImpresion); View.HabilitarUbicacion += new EventHandler<SelectionChangedEventArgs>(this.OnHabilitarUbicacion); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; View.FilaSeleccionada += this.OnFilaSeleccionada; View.DeleteDetails += new EventHandler<EventArgs>(this.OnDeleteDetails); //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'DIAGNOSTICO', 'CLARO'", "", "dbo.Ubicaciones", Local); CargarDatosDetails(); //ListarDatos(); OcultarPestanas(); //Cargo las ubicaciones View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); this.Actualizar_UbicacionDisponible(); #endregion }
public DespachoDTVPresenter(IUnityContainer container, IDespachoDTVView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<DespachoDTVModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.ImprimirHablador += new EventHandler<EventArgs>(this.OnImprimirHablador); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; View.BuscarRegistrosDespachos += new EventHandler<EventArgs>(this.OnBuscarRegistroDespachos); View.MostrarEquiposDespacho += new EventHandler<EventArgs>(this.OnMostrarEquiposDespacho); View.FilaSeleccionada += this.OnFilaSeleccionada; View.ExportPalletSeleccion += this.OnExportPalletSeleccion; //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'DESPACHO', 'CLARO'", "", "dbo.Ubicaciones", Local); View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "DTVPOSIC" } }); View.Model.ListadoProductosDespacho = service.DirectSQLQuery("SELECT MODELO FROM dbo.Despacho_EquiposDIRECTVC WHERE ESTADO = 'DESPACHADO' GROUP BY MODELO", "", "dbo.Despacho_EquiposDIRECTVC", Local); CargarDatosDetails(); //ListarDatos(); #endregion }
public EtiquetadosPresenter(IUnityContainer container, IEtiquetadosView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<EtiquetadosModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.ReplicateDetailsBy_Column += new EventHandler<RoutedEventArgs>(this.OnReplicateDetailsBy_Column); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.DeleteDetails += new EventHandler<EventArgs>(this.OnDeleteDetails); View.ImprimirEtiqueta_Individual += new EventHandler<EventArgs>(this.OnImprimirEtiqueta_Individual); View.GetNumeroCodigos += new EventHandler<SelectionChangedEventArgs>(this.OnGetNumeroCodigos); //Recibo //View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; //View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; //View.ConfirmarRecibo += this.OnConfirmarRecibo; //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'ETIQUETADO', 'CLARO'", "", "dbo.Ubicaciones", Local); View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); CargarDatosDetails(); ListarDatos(); #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 }
public int offset = 5; //# columnas que no se debe replicar porque son fijas. public ConfirmacionIntermediaPresenterP(IUnityContainer container, IConfirmacionIntermediaViewP view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<ConfirmacionIntermediaModelP>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.EmpacarConfirmacion += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.FilaSeleccionada += this.OnFilaSeleccionada; View.ImprimirHablador += new EventHandler<EventArgs>(this.OnImprimirHablador); View.GenerarCodigo += new EventHandler<EventArgs>(this.OnGenerarCodigo); //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } DataTable table = new DataTable(); table.Columns.Add("UbicacionDestino", typeof(string)); table.Rows.Add("DIAGNOSTICO"); View.Model.ListUbicacionesDestino = table; View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); CargarDatosDetails(); //ListarDatos(); #endregion }
public int offset = 5; //# columnas que no se debe replicar porque son fijas. public EnsamblePresenter(IUnityContainer container, IEnsambleView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<EnsambleModel>(); #region Metodos //View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'BODEGA', 'CLARO'", "", "dbo.Ubicaciones", Local); CargarDatosDetails(); ListarDatos(); #endregion }
public int offset = 5; //# columnas que no se debe replicar porque son fijas. public NovedadesPresenter(IUnityContainer container, INovedadesView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<NovedadesModel>(); #region Metodos View.VerEquiposNovedades += new EventHandler<EventArgs>(this.OnVerEquiposNovedades); View.ExportPrealertas += new EventHandler<EventArgs>(this.OnExportPrealertas); View.ExportNovedadTipoA += new EventHandler<EventArgs>(this.OnExportNovedadTipoA); View.ExportNovedadTipoB += new EventHandler<EventArgs>(this.OnExportNovedadTipoB); View.BuscarPrealertas += new EventHandler<EventArgs>(this.OnBuscarPrealertas); //View.BuscarNoveTipoB += new EventHandler<EventArgs>(this.OnBuscarNoveTipoB); #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } CargarDatosDetails(); ActualizarListPrealertas(); ActualizarListNoveTipoB(); ActualizarComboArchivos(); #endregion }
public ReparacionesPresenter(IUnityContainer container, IReparacionesView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<ReparacionesModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.GenerarCodigo += new EventHandler<EventArgs>(this.OnGenerarCodigo); //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); View.CargarDatosReparacion += new EventHandler<EventArgs>(this.CargarDatosReparacion); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.FiltrarDatosEntrega += new EventHandler<SelectionChangedEventArgs>(this.OnFiltrarDatosEntrega); View.ConfirmarImpresion += new EventHandler<EventArgs>(this.OnConfirmarImpresion); View.HabilitarUbicacion += new EventHandler<SelectionChangedEventArgs>(this.OnHabilitarUbicacion); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; View.FilaSeleccionada += this.OnFilaSeleccionada; //Asignacion View.BuscarRegistrosAsignacion += this.OnBuscarRegistrosAsignacion; View.ActualizarRegistrosAsignacion += this.OnActualizarRegistrosAsignacion; View.ListarEquiposEstibas += this.OnListarEquiposEstibas; View.MostrarTecnicosEstibas += this.OnMostrarTecnicosEstibas; View.ConfirmarTecnicoEquipo += this.OnConfirmarTecnicoEquipo; View.ConsultaReparacionAnterior += new EventHandler<EventArgs>(this.OnConsultaReparacionAnterior); View.DeleteDetails += new EventHandler<EventArgs>(this.OnDeleteDetails); View.FiltraPorTecnico += new EventHandler<EventArgs>(this.OnFiltraPorTecnico); View.AddToList += new EventHandler<EventArgs>(this.OnAddToList); View.RemoveSelection += new EventHandler<EventArgs>(this.OnRemoveSelection); View.HabilitarMotivo += new EventHandler<EventArgs>(this.OnHabilitarMotivo); View.CargarHistorico += new EventHandler<EventArgs>(this.CargarHistorico); #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'REPARACION', 'CLARO'", "", "dbo.Ubicaciones", Local); View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); CargarDatosDetails(); ListarDatos(); CargarTecnicosReparacion(); View.Model.ListRecordsAddToPallet = service.DirectSQLQuery("EXEC sp_GetProcesos 'BUSCARMERCANCIAENTREGAREP', '', '',''", "", "dbo.EquiposClaro", Local); //Cargo los tecnicos View.Model.ListadoTecnicos = service.GetSysUser (new SysUser()); this.Actualizar_UbicacionDisponible(); if (App.curUser.UserRols.Where(f => f.Rol.RolCode == "ADMIN" || f.Rol.RolCode == "CLARODIAG").Count() == 0) { View.GetTabEntrega.IsEnabled = false; if (this.userName == "GLUGO" || this.userName == "JHERNANDEZ") { View.GetTabEntrega.IsEnabled = true; } } view.StackProcesoReparacion.IsEnabled = false; #endregion }
public ReparacionesDTVPresenter(IUnityContainer container, IReparacionesDTVView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<ReparacionesDTVModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); View.FiltrarDatosEntrega += new EventHandler<EventArgs>(this.OnFiltrarDatosEntrega); View.GenerarCodigo += new EventHandler<EventArgs>(this.OnGenerarCodigo); View.ConfirmarImpresion += new EventHandler<EventArgs>(this.OnConfirmarImpresion); //OnFiltrarDatosEntrega //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); View.CargarDatosReparacion += new EventHandler<EventArgs>(this.CargarDatosReparacion); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.ListarEquiposSeleccion += new EventHandler<EventArgs>(this.OnListarEquiposSeleccion); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; //Asignacion View.BuscarRegistrosAsignacion += this.OnBuscarRegistrosAsignacion; View.ActualizarRegistrosAsignacion += this.OnActualizarRegistrosAsignacion; View.ListarEquiposEstibas += this.OnListarEquiposEstibas; View.MostrarTecnicosEstibas += this.OnMostrarTecnicosEstibas; View.ConfirmarTecnicoEquipo += this.OnConfirmarTecnicoEquipo; View.FilaSeleccionada += this.OnFilaSeleccionada; //Proceso View.CargarHistorico += new EventHandler<EventArgs>(this.CargarHistorico); #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'REPARACION', 'CLARO'", "", "dbo.Ubicaciones", Local); View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); CargarDatosDetails(); //ListarDatos(); //Cargo los tecnicos View.Model.ListadoTecnicos = service.GetSysUser(new SysUser()); view.StackProcesoReparacion.IsEnabled = false; #endregion }
private void NewTask() { WMSServiceClient serv = new WMSServiceClient(); DocumentType docType = new DocumentType { DocClass = new DocumentClass { DocClassID = SDocClass.Task } }; docType.DocTypeID = SDocType.CountTask; // CAA [2010/05/05] Valida que se incluyan las columnas necesarias en el reporte // Indica si utiliza Product para la programacion del conteo. bool useProduct = true; if (cboToDo.SelectedIndex == 0) //Only BIN { useProduct = false; if (!products.Columns.Contains("BinCode")) { Util.ShowError("BinCode column missing."); return; } } else if (cboToDo.SelectedIndex == 1) // BIN & PRODUCT { if (!products.Columns.Contains("BinCode") || !products.Columns.Contains("Product")) { Util.ShowError("BinCode and/or Product columns are missing."); return; } } Document document = new Document { DocType = docType, CrossDocking = false, IsFromErp = false, Location = App.curLocation, Company = App.curCompany, Date1 = DateTime.Today, CreationDate = DateTime.Now, CreatedBy = App.curUser.UserName, Notes = cboToDo.SelectedIndex.ToString() }; document = serv.CreateNewDocument(document, true); // SaveDocument(document); // Details foreach (DataRow row in products.Rows) { // ojo... siempre deben enviar los alias "producto" "binCode" en el reporte !!! Product prod = null; try { if (!string.IsNullOrEmpty(row["Product"].ToString()) && useProduct) prod = serv.GetProduct(new Product { ProductCode = row["Product"].ToString() })[0]; } catch { } Bin bin = null; try { if (!string.IsNullOrEmpty(row["BinCode"].ToString())) bin = serv.GetBin(new Bin { BinCode = row["BinCode"].ToString() })[0]; } catch { } //Crea el BinTask en el server BinByTask binByTask = new BinByTask { CreatedBy = App.curUser.UserName, CreationDate = DateTime.Now, Bin = bin, Product = prod, TaskDocument = document, Status = new Status { StatusID = DocStatus.New } }; try { serv.SaveBinByTask(binByTask); } catch { continue; } } Util.ShowMessage("Counting Task " + document.DocNumber + " was created."); ClosePopup(); }
int countType = -1; //0 = Bin , 1 = PRODUCT public InventoryCountPresenter(IUnityContainer container, IInventoryCountView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<InventoryCountModel>(); View.FilterByBin += new EventHandler<DataEventArgs<string>>(View_FilterByBin); View.AddToAssigned += new EventHandler<EventArgs>(View_AddToAssigned); View.RemoveFromList += new EventHandler<EventArgs>(View_RemoveFromList); View.CreateNewTask += new EventHandler<EventArgs>(View_CreateNewTask); View.LoadDetails += new EventHandler<DataEventArgs<Document>>(View_LoadDetails); View.ShowTicket += new EventHandler<EventArgs>(View_ShowTicket); View.ChangeStatus += new EventHandler<EventArgs>(view_ChangeStatus); //View.BinTaskSelected += new EventHandler<DataEventArgs<ProductStock>>(View_BinTaskSelected); View.ChangeCountedQty += new EventHandler<DataEventArgs<object[]>>(View_ChangeCountedQty); View.ConfirmCountTask += new EventHandler<EventArgs>(View_ConfirmCountTask); View.CancelTask += new EventHandler<EventArgs>(View_CancelTask); View.SearchDocument += new EventHandler<DataEventArgs<string>>(View_SearchDocument); View.RefreshDocuments += new EventHandler<EventArgs>(View_RefreshDocuments); View.ReloadDocument += new EventHandler<EventArgs>(View_ReloadDocument); View.FilterByProduct += new EventHandler<DataEventArgs<Product>>(View_FilterByProduct); View.UpdateDocumentOption += new EventHandler<DataEventArgs<int>>(View_UpdateDocumentOption); View.ShowInitialTicket += new EventHandler<EventArgs>(View_ShowInitialTicket); View.LoadNoCountBalance += new EventHandler<EventArgs>(View_LoadNoCountBalance); View.SendAdjustment += new EventHandler<EventArgs>(View_SendAdjustment); View.ChangeSendOption += new EventHandler<EventArgs>(OnChangeSendOption); view.SelectAll += new EventHandler<EventArgs>(OnSelectAll); view.UnSelectAll += new EventHandler<EventArgs>(OnUnSelectAll); //DocType docType = new DocumentType { DocClass = new DocumentClass { DocClassID = SDocClass.Task } }; docType.DocTypeID = SDocType.CountTask; ProcessWindow pw = new ProcessWindow("Loading Bin List ..."); //oriAvailableBin = service.GetBin(new Bin { Location = App.curLocation }).OrderBy(f=> f.BinCode).ToList(); oriAvailableBin = service.GetBin(new Bin()).OrderBy(f => f.BinCode).ToList(); pw.Close(); RefreshDocuments(); //Product Categories try { IList<ProductCategory> list = service.GetProductCategory(new ProductCategory()); list.Add(new ProductCategory { Name = "... Any Category"}); View.Model.ProductCategories = list.OrderBy(f=>f.Name).ToList(); } catch { } // CAA [2010/07/07] Carga los filtros de busq de bines. IqReportColumn rc = new IqReportColumn(); rc.Alias = "Filter by Bin"; rc.FilteredValue = ""; View.BFilters.cboStrComp.SelectedValue = " = _val"; View.BFilters.RepColumn = rc; }
public EmpaquePresenter(IUnityContainer container, IEmpaqueView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<EmpaqueModel>(); #region Metodos View.ConfirmBasicData += new EventHandler<EventArgs>(this.OnConfirmBasicData); //View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); view.CargaMasiva += new EventHandler<DataEventArgs<DataTable>>(this.OnCargaMasiva); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ConfirmarMovimiento += new EventHandler<EventArgs>(this.OnConfirmarMovimiento); View.ConfirmarMovimientoProcesamiento += new EventHandler<EventArgs>(this.OnConfirmarMovimientoProcesamiento); View.GenerarCodigo += new EventHandler<EventArgs>(this.OnGenerarCodigo); View.GenerarCodigoEmpaque += new EventHandler<EventArgs>(this.OnGenerarCodigoEmpaque); View.ConfirmarImpresion += new EventHandler<EventArgs>(this.OnConfirmarImpresion); View.ConfirmarImpresionHablador += new EventHandler<EventArgs>(this.OnConfirmarImpresionHablador); View.SeleccionPallet_Consulta += new EventHandler<EventArgs>(this.OnSeleccionPallet_Consulta); View.SeleccionCaja_Consulta += new EventHandler<EventArgs>(this.OnSeleccionCaja_Consulta); View.GenerarPallet += new EventHandler<EventArgs>(this.OnGenerarPallet); View.EnterConsultarPallet += new EventHandler<KeyEventArgs>(this.OnEnterConsultarPallet); View.KeyConsultarPallet += new EventHandler<KeyEventArgs>(this.OnKeyConsultarPallet); View.CrearNuevaCaja += new EventHandler<EventArgs>(this.OnCrearNuevaCaja); View.CrearNuevoPallet += new EventHandler<EventArgs>(this.OnCrearNuevoPallet); View.CerrarPallet += new EventHandler<EventArgs>(this.OnCerrarPallet); View.CerrarCaja += new EventHandler<EventArgs>(this.OnCerrarCaja); View.EliminarCaja += new EventHandler<EventArgs>(this.OnEliminarCaja); View.AbrirCaja += new EventHandler<EventArgs>(this.OnAbrirCaja); View.AbrirPallet += new EventHandler<EventArgs>(this.OnAbrirPallet); View.EliminarPallet += new EventHandler<EventArgs>(this.OnEliminarPallet); View.DesempacarEquipos += new EventHandler<EventArgs>(this.OnDesempacarEquipos); View.ImprimirEtiqueta += new EventHandler<EventArgs>(this.OnImprimirEtiqueta); //Recibo View.BuscarRegistrosRecibo += this.OnBuscarRegistrosRecibo; View.ActualizarRegistrosRecibo += this.OnActualizarRegistrosRecibo; View.ConfirmarRecibo += this.OnConfirmarRecibo; //ConfirmarMovimiento #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { BinID = 4 }); try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } //Cargo las ubicaciones View.Model.ListadoPosiciones = service.GetMMaster(new MMaster { MetaType = new MType { Code = "POSICION1" } }); View.Model.ListUbicacionesDestino = service.DirectSQLQuery("EXEC sp_GetProcesos 'UBICACIONESDESTINO', 'EMPAQUE', 'CLARO'", "", "dbo.Ubicaciones", Local); this.Actualizar_UbicacionDisponible(); ActualizarListPallet(); CargarDatosDetails(); // ListarDatos(); #endregion }
public EntradaAlmacenPresenter(IUnityContainer container, IEntradaAlmacenView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<EntradaAlmacenModel>(); #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); View.MostrarInformacion += new EventHandler<EventArgs>(this.OnMostrarInformacion); //MostrarInformacion. #endregion #region Serial View.EvaluarTipoProducto += new EventHandler<DataEventArgs<Product>>(this.OnEvaluarTipoProducto); View.AddLine += new EventHandler<EventArgs>(this.OnAddLine); #endregion #region Details View.SaveDetails += new EventHandler<EventArgs>(this.OnSaveDetails); View.ReplicateDetails += new EventHandler<EventArgs>(this.OnReplicateDetails); View.Imprimir += new EventHandler<EventArgs>(this.OnImprimir); #endregion #endregion #region Datos View.Model.HeaderDocument = new Document(); View.Model.RecordCliente = service.GetLocation(new Location { LocationID = App.curLocation.LocationID }).First(); View.Model.ListBinEntradaAlmacen = service.GetBin(new Bin { LevelCode = "R", Location = View.Model.RecordCliente }); ProductDefault = service.GetProduct(new Product { ProductCode = WmsSetupValues.DEFAULT }).First(); //string fullyqualifiedname = new DateTime().GetType().AssemblyQualifiedName; try { Local = service.GetConnection(new Connection { Name = "LOCAL" }).First(); } catch { } #endregion }