public void seSelecciono(DataGridViewRow registro,List<Object> tiposDeServicio)
{
idRuta = Convert.ToInt32(registro.Cells["Id"].Value);
txtCodigo.Text = codigoActual = registro.Cells["Código Ruta"].Value.ToString();
txtCiudadOrigenNueva.Text = txtCiudadOrigen.Text = registro.Cells["Origen"].Value.ToString();
txtCiudadDestinoNueva.Text = txtCiudadDestino.Text = registro.Cells["Destino"].Value.ToString();
txtPrecioEncomiendaNueva.Text = txtPrecioEncomienda.Text = registro.Cells["Precio Base Por Kilogramo"].Value.ToString();
txtPrecioPasajeNuevo.Text = txtPrecioPasaje.Text = registro.Cells["Precio Base Pasaje"].Value.ToString();
this.listaServicios.Clear();
this.listaServicios.AddRange(tiposDeServicio);
Boolean viajeProgramado = !tieneViajeProgramado(idRuta);
botonSelOrigen.Enabled =
botonSelDestino.Enabled =
botonSelServicios.Enabled =
txtPrecioEncomienda.Enabled =
txtPrecioPasaje.Enabled =
txtCiudadDestino.Enabled =
txtCiudadOrigen.Enabled =
txtCiudadOrigenNueva.Enabled =
txtCiudadDestinoNueva.Enabled = viajeProgramado;
Boolean viajeVendidos = !tieneViajeVendidos(idRuta);
txtPrecioEncomiendaNueva.Enabled =
txtPrecioPasajeNuevo.Enabled = viajeVendidos;
txtCodigo.Enabled = true;
botonLimpiar.Enabled = true;
botonGuardar.Enabled = true;
foreach (Object e in tiposDeServicio)
{
label9.Text += (String)e + " - ";
label10.Text += (String)e + " - ";
}
label9.Text = label9.Text.Remove(label9.Text.Length - 2);
label10.Text = label10.Text.Remove(label10.Text.Length - 2);
}