Ejemplo n.º 1
0
        public void CargarAeropuertoOrigen()
        {
            var aeropuertos            = _aeropuertosServicioOrigen.ObtenerAeropuertos();
            var aeropuertosSeleccionar = new Aeropuerto();

            aeropuertosSeleccionar.Nombre = "Seleccionar";
            aeropuertos.Add(aeropuertosSeleccionar);
            var conector = new BindingSource();

            conector.DataSource = aeropuertos;
            FormUtils.CargarComboV2(ref cmbAeropuertoOrigen, conector, "Nombre", "IdAeropuerto");
            var aeropuertoSeleccionado = aeropuertos.First(tp => tp.Nombre == "Seleccionar");

            cmbAeropuertoOrigen.SelectedItem = aeropuertoSeleccionado;
        }
Ejemplo n.º 2
0
        public void CargarDestino()
        {
            var aeropuertos            = _aeropuertosServicioDestino.ObtenerAeropuertos();
            var aeropuertosSeleccionar = new Aeropuerto();

            aeropuertosSeleccionar.Domicilio = "Seleccionar";
            aeropuertos.Add(aeropuertosSeleccionar);
            var conector = new BindingSource();

            conector.DataSource = aeropuertos;
            FormUtils.CargarComboV2(ref cmbDestino, conector, "Domicilio", "Domicilio");
            var aeropuertoSeleccionado = aeropuertos.First(tp => tp.Domicilio == "Seleccionar");

            cmbDestino.SelectedItem = aeropuertoSeleccionado;
        }
Ejemplo n.º 3
0
        private void CargarTipoDocumento()
        {
            var tipoDocumentos = _tipoDocumentosServicio.ObtenerTipoDocumentos();

            tipoDocumentos.Add(new TipoDocumento
            {
                Id = "Seleccionar"
            });
            var conector = new BindingSource();

            conector.DataSource = tipoDocumentos;
            FormUtils.CargarComboV2(ref cmbTipoDocumento, conector, "Id", "Id");
            var tipoDocumentoSeleccionado = tipoDocumentos.First(tp => tp.Id == "Seleccionar");

            cmbTipoDocumento.SelectedItem = tipoDocumentoSeleccionado;
        }
Ejemplo n.º 4
0
        private void CargarTipoPasaje()
        {
            var tipoPasajes            = _tipoPasajesServicio.ObtenerTipoPasajes();
            var tipoPasajesSeleccionar = new TipoPasaje();

            tipoPasajesSeleccionar.Detalle = "Seleccionar";
            tipoPasajes.Add(tipoPasajesSeleccionar);

            var conector = new BindingSource();

            conector.DataSource = tipoPasajes;

            FormUtils.CargarComboV2(ref cmbTipoPasaje, conector, "Detalle", "Id");
            var tipoPasajeSeleccionado = tipoPasajes.First(tp => tp.Detalle == "Seleccionar");

            cmbTipoPasaje.SelectedItem = tipoPasajeSeleccionado;
        }
Ejemplo n.º 5
0
        private void CargarNroDocumento()
        {
            var nroDocumentos = _pasajerosServicio.ObtenerPasajeros(((TipoDocumento)cmbTipoDocumento.SelectedItem).Id, registro);

            var nroDocumentosSeleccionar = new Pasajero();

            nroDocumentosSeleccionar.NroDocumento = "Seleccionar";
            nroDocumentos.Add(nroDocumentosSeleccionar);
            var conector = new BindingSource();

            conector.DataSource = nroDocumentos;

            FormUtils.CargarComboV2(ref cmbNroDocumento, conector, "NroDocumento", "TipoDocumento");
            var nroDocumentosSeleccionado = nroDocumentos.First(tp => tp.NroDocumento == _pasaje.NroDocumento.NroDocumento);

            cmbNroDocumento.SelectedItem = nroDocumentosSeleccionado;
        }