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; }
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; }
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; }
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; }
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; }