internal ShowListado getRecorridosConPasajesMasComprados(string anio, string semestre) { ShowListado showListado = new ShowListado(); showListado.Descripcion = 1; showListado.Listado = this.getListado(anio, semestre, "FGNN_19.TOP5_recorridos_mas_comprados"); return(showListado); }
internal ShowListado getRecorridosConMasCabinasLibres(string anio, string semestre) { ShowListado showListado = new ShowListado(); showListado.Descripcion = 2; showListado.Listado = this.getListado(anio, semestre, "FGNN_19.TOP5_recorridos_mas_cabinas_libres"); return(showListado); }
internal ShowListado getCrucerosConMasDiasFueraDeServicio(string anio, string semestre) { ShowListado showListado = new ShowListado(); showListado.Descripcion = 3; showListado.Listado = this.getListadoConFecha(anio, semestre, "FGNN_19.TOP5_cruceros_mas_dias_fuera_servicio"); return(showListado); }
internal void GetRecorridosConFiltros(string anioSeleccionado, string semestreSeleccionado) { semestreSeleccionado = semestreSeleccionado.Equals("Primer semestre") ? "1" : "2"; ShowListado recorridos = repo.getRecorridosConPasajesMasComprados(anioSeleccionado, semestreSeleccionado); if (recorridos.Listado != null) { this.form.showRecorridos(recorridos); } else { this.form.showErrorMessage("No se pudieron encontrar recorridos que coincidan con su busqueda."); } }
internal void GetCrucerosConFiltros(string anioSeleccionado, string semestreSeleccionado) { semestreSeleccionado = semestreSeleccionado.Equals("Primer semestre") ? "1" : "2"; ShowListado cruceros = repo.getCrucerosConMasDiasFueraDeServicio(anioSeleccionado, semestreSeleccionado); if (cruceros.Listado != null) { CrucerosConMasDiasSinServicio.showRecorridos(cruceros); } else { CrucerosConMasDiasSinServicio.showErrorMessage("No se pudieron encontrar cruceros que coincidan con su busqueda."); } }
public void showRecorridos(ShowListado resultados) { this.limpiarButton.Enabled = true; this.dateTimePicker1.Enabled = true; this.comboSemestre.Enabled = true; switch (resultados.Descripcion) { case 1: this.resultadosTop5Grid.DataSource = resultados.Listado.Select( resultado => new { PuertoSalida = resultado.PrimeraColumna, PuertoLlegada = resultado.SegundaColumna, CantidadDePasajes = resultado.TerceraColumna } ).ToList(); break; case 2: this.resultadosTop5Grid.DataSource = resultados.Listado.Select( resultado => new { PuertoSalida = resultado.PrimeraColumna, PuertoLlegada = resultado.SegundaColumna, CantidadDeCabinas = resultado.TerceraColumna } ).ToList(); break; case 3: this.resultadosTop5Grid.DataSource = resultados.Listado.Select( resultado => new { Nombre = resultado.PrimeraColumna, Modelo = resultado.SegundaColumna, CantidadDeCruceros = resultado.TerceraColumna } ).ToList(); break; } }