Beispiel #1
0
        private void _vista_UsuarioDeseaObtenerPolizaAseguradaPorCliente(object sender, Argumentos.DocumentoRecepcionERPArgumento e)
        {
            try
            {
                _vista.PolizaAseguradora = new List <PolizaAsegurada>();
                var polizasDeSeguro = PolizaAseguradaServicio.ObtenerPolizaAseguradaPorCliente(e.PolizaAsegurada);

                if (polizasDeSeguro.Count == 0)
                {
                    var configuraciones = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion {
                        PARAM_TYPE = "POLIZAS", PARAM_GROUP = "POLIZAS_SEGUROS"
                    });
                    foreach (var configuracion in configuraciones)
                    {
                        polizasDeSeguro.Add(new PolizaAsegurada
                        {
                            DOC_ID_CONFIGURATION = configuracion.TEXT_VALUE
                            ,
                            POLIZA_INSURANCE = configuracion.PARAM_CAPTION
                        });
                    }
                }
                _vista.PolizaAseguradora = polizasDeSeguro;
            }
            catch (Exception ex)
            {
                InteraccionConUsuarioServicio.Mensaje(ex.Message);
            }
        }
        private void _vista_VistaCargandosePorPrimeraVez(object sender, EventArgs e)
        {
            try
            {
                _vista.CentrosDeDistribucion = ConfiguracionServicio.ObtenerCentrosDeDistribucionPorLogin(new Entidades.Configuracion
                {
                    LOGIN = InteraccionConUsuarioServicio.ObtenerUsuario()
                });

                _vista.ListaDeSeguridad =
                    SeguridadServicio.ObtenerPermisosDeSeguridad(new SeguridadArgumento
                {
                    Seguridad =
                        new Seguridad
                    {
                        PARENT   = Enums.GetStringValue(Tipos.PadreDePrivilegio.SolicitudDeTraslado),
                        CATEGORY = Enums.GetStringValue(Tipos.CategorigaDePrivilegio.Seguridad),
                        LOGIN    = InteraccionConUsuarioServicio.ObtenerUsuario()
                    }
                });
            }
            catch (Exception ex)
            {
                InteraccionConUsuarioServicio.Mensaje(ex.Message);
            }
        }
Beispiel #3
0
 private void _vista_VistaCargandosePorPrimeraVez(object sender, EventArgs e)
 {
     try
     {
         _vista.Operadores       = UsuarioServicio.ObtenerUsuariosTipoBodegaAsignadosCD(InteraccionConUsuarioServicio.ObtenerCentroDistribucion());
         _vista.TiposDeRecepcion = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion {
             PARAM_TYPE = "SISTEMA", PARAM_GROUP = "TYPE_RECEPTION"
         });
         _vista.Prioridad = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion {
             PARAM_TYPE = "SISTEMA", PARAM_GROUP = "PRIORITY"
         });
         _vista.FuenteExterna       = FuenteExternaServicio.ObtenerFuentesExternas();
         _vista.Usuario             = InteraccionConUsuarioServicio.ObtenerUsuario();
         _vista.ParametrosDeSistema =
             ParametroServicio.ObtenerParametro(new ConsultaArgumento
         {
             GrupoParametro = Enums.GetStringValue(GrupoParametro.Sistema),
             IdParametro    = Enums.GetStringValue(IdParametro.TipoDeClienteMovilDe3Pl)
         });
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.Mensaje(ex.Message);
     }
 }
Beispiel #4
0
        private void _vista_UsuarioDeseaBuscarSolicitudDeTraslado(object sender, SolicitudDeTrasladoArgumento e)
        {
            try
            {
                _vista.SolicitudDeTrasladoEncabezado = SolicitudDeTrasladoServicio.ObtenerSolicitudDeTrasladoEncabezado(e);
                if (_vista.SolicitudDeTrasladoEncabezado == null)
                {
                    return;
                }

                _vista.SolicitudDeTrasladoDetalle = SolicitudDeTrasladoServicio.ObtenerSolicitudDeTrasladoDetalle(e);

                _vista.CentrosDeDistribucionOrigen  = ConfiguracionServicio.ObtenerCentrosDeDistribucion(new Entidades.Configuracion());
                _vista.CentrosDeDistribucionDestino = ConfiguracionServicio.ObtenerCentrosDeDistribucion(new Entidades.Configuracion());

                _vista.BodegasOrigen = BodegaServicio.ObtenerBodegaPorCentroDeDistribucionYUsuario(new Bodega
                {
                    DISTRIBUTION_CENTER_ID = _vista.SolicitudDeTrasladoEncabezado.DISTRIBUTION_CENTER_FROM,
                    LOGIN             = InteraccionConUsuarioServicio.ObtenerUsuario(),
                    IS_WAREHOUSE_FROM = (int)SiNo.Si
                });
                _vista.BodegasDestino = BodegaServicio.ObtenerBodegaPorCentroDeDistribucionYUsuario(new Bodega
                {
                    DISTRIBUTION_CENTER_ID = _vista.SolicitudDeTrasladoEncabezado.DISTRIBUTION_CENTER_TO,
                    LOGIN             = InteraccionConUsuarioServicio.ObtenerUsuario(),
                    IS_WAREHOUSE_FROM = (int)SiNo.Si
                });
            }
            catch (Exception ex)
            {
                InteraccionConUsuarioServicio.Mensaje(ex.Message);
            }
        }
Beispiel #5
0
        private void _vista_VistaCargandosePorPrimeraVez(object sender, System.EventArgs e)
        {
            try
            {
                _vista.Vehiculos = VehiculoServicio.ObtenerVehiculosPorPeso(new VehiculoArgumento {
                    Vehiculo = new Vehiculo()
                });
                _vista.EstablecerVehiculosEnBaseAPesoDePickings(0);
                _vista.Configuracion = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion()
                {
                    PARAM_TYPE = "SISTEMA", PARAM_GROUP = "MANIFIESTO_DE_CARGA"
                });

                _vista.Bodegas    = BodegaServicio.ObtenerBodegaAsignadaAUsuario(InteraccionConUsuarioServicio.ObtenerUsuario());
                _vista.Rutas      = RutasSwiftExpressServicio.ObtenerTodasRutas();
                _vista.Usuario    = InteraccionConUsuarioServicio.ObtenerUsuario();
                _vista.Parametros = ParametroServicio.ObtenerParametro(new ConsultaArgumento
                {
                    GrupoParametro = Enums.GetStringValue(GrupoParametro.DemandaDePicking),
                    IdParametro    = Enums.GetStringValue(IdParametro.ObtieneTipoDeDemanda)
                });
                _vista.ObtenerPuntosDeControles();
                _vista.DetallesEliminados = new List <int?>();
            }
            catch (Exception ex)
            {
                InteraccionConUsuarioServicio.Mensaje(ex.Message + ex.StackTrace);
            }
        }
        public void crearArchivoXml()
        {
            ConfiguracionServicio Stmp = new ConfiguracionServicio();

            Stmp.nombreServicio = "ServicioAtm";
            Stmp.puerto         = 1000;
            //Stmp.urlWs = "http://localhost/wsTest.com.ec";
            Stmp.ip             = "127.0.0.1";
            Stmp.dll            = "ServicioAtms.dll";
            Stmp.nombreServicio = "Servicio Atms";
            XmlElement raiz = xml.CreateElement("", "Servicios", "");
            XmlElement nodo = xml.CreateElement("", "Servicio", "");

            XmlElement nombreServicio = xml.CreateElement("", "nombre", "");
            XmlText    dato           = xml.CreateTextNode(Stmp.nombreServicio);

            nombreServicio.AppendChild(dato);
            nodo.AppendChild(nombreServicio);

            XmlElement direccionIp = xml.CreateElement("", "DireccionIP", "");

            //XmlText dato = xml.CreateTextNode(Stmp.ip);
            dato = xml.CreateTextNode(Stmp.ip);
            direccionIp.AppendChild(dato);
            nodo.AppendChild(direccionIp);

            XmlElement puerto = xml.CreateElement("", "Puerto", "");

            dato = xml.CreateTextNode(Stmp.puerto.ToString());
            puerto.AppendChild(dato);
            nodo.AppendChild(puerto);

            //XmlElement ws = xml.CreateElement("", "ConexionHostCoac", "");
            XmlElement origen = xml.CreateElement("", "conexionBDD", "");

            dato = xml.CreateTextNode("Data Source=127.0.0.1;Initial Catalog=NDC_BDD;User ID=ControladorBDD;Password=123456");
            origen.AppendChild(dato);
            nodo.AppendChild(origen);

            XmlElement ensamblado = xml.CreateElement("", "dllServicio", "");

            dato = xml.CreateTextNode(Stmp.dll);
            ensamblado.AppendChild(dato);
            nodo.AppendChild(ensamblado);
            raiz.AppendChild(nodo);
            xml.AppendChild(raiz);
            XmlDeclaration xmldecl;

            xmldecl = xml.CreateXmlDeclaration("1.0", null, null);
            xml.InsertBefore(xmldecl, raiz);
            xml.Save(pathAbrir);
            //return xml.InnerXml; //devuelve en string el archivo xml
        }
Beispiel #7
0
 private void _vista_UsuarioDeseaObtenerTipoDeRecepcion(object sender, Argumentos.DocumentoRecepcionERPArgumento e)
 {
     try
     {
         _vista.TiposDeRecepcion = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion {
             PARAM_TYPE = "SISTEMA", PARAM_GROUP = "TYPE_RECEPTION"
         });
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.Mensaje(ex.Message);
     }
 }
Beispiel #8
0
        private void ObtenerEstadosDeMaterial()
        {
            var listaDeEstados = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion
            {
                PARAM_TYPE  = "ESTADO",
                PARAM_GROUP = "ESTADOS"
            });

            listaDeEstados.ToList().ForEach(e =>
            {
                e.SPARE1 = AplicaPropiedadDelEstado(e.SPARE1) ? "SI" : "NO";
                e.SPARE2 = AplicaPropiedadDelEstado(e.SPARE2) ? "SI" : "NO";
            });

            _vista.EstadosDeMaterial = listaDeEstados;
        }
 private void _vista_UsuarioDeseaObtenerTiposDeClases(object sender, ClaseArgumento e)
 {
     try
     {
         _vista.Tipos =
             ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion
         {
             PARAM_TYPE  = Enums.GetStringValue(TipoDeClasificaciones.Sistema),
             PARAM_GROUP = Enums.GetStringValue(GrupoDeClasificaciones.TipoDeClase)
         });
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.MensajeErrorDialogo($"Error al obtener los tipos de clases : {ex.Message}");
     }
 }
Beispiel #10
0
 private void _vista_VistaCargandosePorPrimeraVez(object sender, EventArgs e)
 {
     try
     {
         _vista.Configuraciones = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion
         {
             PARAM_GROUP = Enums.GetStringValue(ParametrosGeneralesGrupo.InventarioInactivo)
             ,
             PARAM_TYPE = Enums.GetStringValue(ParametrosGeneralesTipo.Almacenamiento)
         });
         _vista_UsuarioDeseaObtenerBodegas(null, null);
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.Mensaje(ex.Message);
     }
 }
 private void _vista_VistaCargandosePorPrimeraVez(object sender, EventArgs e)
 {
     try
     {
         _vista.Clases = ClaseServicio.ObtenerClases();
         _vista.Tipos  =
             ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion
         {
             PARAM_TYPE  = Enums.GetStringValue(TipoDeClasificaciones.Sistema),
             PARAM_GROUP = Enums.GetStringValue(GrupoDeClasificaciones.TipoDeClase)
         });
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.MensajeErrorDialogo($"Error al cargar la vista: {ex.Message}");
     }
 }
Beispiel #12
0
 private void _vista_VistaCargandosePorPrimeraVez(object sender, System.EventArgs e)
 {
     try
     {
         _vista.TiposUbicacion = ConfiguracionServicio.ObtenerConfiguracionesGrupoYTipo(new Entidades.Configuracion
         {
             PARAM_TYPE  = "SISTEMA",
             PARAM_GROUP = "TIPO_UBICACIONES"
         });
         _vista.Bodegas     = BodegaServicio.ObtenerBodegaAsignadaAUsuario(InteraccionConUsuarioServicio.ObtenerUsuario());
         _vista.Ubicaciones =
             EstadoDeUbicacionesServicio.ObtenerEstadoDeUbicaciones(new EstadoDeUbicacionArgumento());
     }
     catch (Exception ex)
     {
         InteraccionConUsuarioServicio.MensajeErrorDialogo(ex.Message);
     }
 }
        public List <ConfiguracionServicio> obtenerDatosXml()
        {
            cargar_archivo_configuracionXml();

            List <ConfiguracionServicio> datosServicio = new List <ConfiguracionServicio>();
            XmlNodeList servicios = xml.GetElementsByTagName("Servicios");
            XmlNodeList lista     = ((XmlElement)servicios[0]).GetElementsByTagName("Servicio");
            int         num       = 0;

            foreach (XmlElement nodo in lista)
            {
                num++;
                XmlNodeList           nNombre         = nodo.GetElementsByTagName("nombre");
                XmlNodeList           nipServidor     = nodo.GetElementsByTagName("DireccionIP");
                XmlNodeList           npuertoServidor = nodo.GetElementsByTagName("Puerto");
                XmlNodeList           conBDD          = nodo.GetElementsByTagName("conexionBDD");
                XmlNodeList           ndll            = nodo.GetElementsByTagName("ipServicioAdmin");
                ConfiguracionServicio datosConfig     = new ConfiguracionServicio();
                datosConfig.conexion = conBDD[0].InnerText;
                datosConfig.numero   = num.ToString();
                datosConfig.ip       = nipServidor[0].InnerText;
                datosConfig.puerto   = int.Parse(npuertoServidor[0].InnerText);
                try
                {
                    datosConfig.dll = ndll[0].InnerText;
                }
                catch (NullReferenceException e)
                {
                    datosConfig.dll = "127.0.0.1";
                }
                datosConfig.nombreServicio = nNombre[0].InnerText;
                datosConfig.estado         = false;
                datosServicio.Add(datosConfig);
            }
            return(datosServicio);
        }
Beispiel #14
0
 private void _vista_UsuarioDeseaRefrescarCentrosDeDistribucionOrigen(object sender, EventArgs e)
 {
     _vista.CentrosDeDistribucionOrigen = ConfiguracionServicio.ObtenerCentrosDeDistribucion(new Entidades.Configuracion());
 }
Beispiel #15
0
 private void _vista_UsuarioDeseaRefrescarCentrosDeDistribucionDestino(object sender, EventArgs e)
 {
     _vista.CentrosDeDistribucionDestino = ConfiguracionServicio.ObtenerCentrosDeDistribucionPorLogin(new Entidades.Configuracion {
         LOGIN = InteraccionConUsuarioServicio.ObtenerUsuario()
     });
 }
Beispiel #16
0
 private void _vista_UsuarioDeseaRefrescarTipos(object sender, EventArgs e)
 {
     _vista.TiposSolicitudDeTraslado = ConfiguracionServicio.ObtenerTiposSolicitudDeTraslado(new Entidades.Configuracion());
 }