diff --git a/Envios/envios.cs b/Envios/envios.cs index 3f65d49..b68084b 100644 --- a/Envios/envios.cs +++ b/Envios/envios.cs @@ -158,8 +158,6 @@ namespace compabetov2 { llenarPanel(); ImprimirTicketConcluido(envio); - - } } }); diff --git a/Estadiscticas.cs b/Estadiscticas.cs index 17cae3a..33c9dd6 100644 --- a/Estadiscticas.cs +++ b/Estadiscticas.cs @@ -36,6 +36,8 @@ namespace compabetov2 resumen = service.estadisticas(fechaBuscar); List productosMes = estadisticasMes(); List productosDia = estadisticasDia(); + decimal totalmes = totalMes(); + decimal totaldia = totalDia(); Dictionary estadisticas = new Dictionary { @@ -43,7 +45,8 @@ namespace compabetov2 { "productos", productosMes }, { "productoMasVendido", prodctoMasVendido(productosMes) }, { "mejorVendedor", mejorVenderdorMes() }, - { "totalMes", totalMes() }, + { "totalMes", totalmes }, + { "totalMesSinEnvio", totalMesSinEnvio(totalmes) }, } }, { "dia", new Dictionary{ @@ -57,6 +60,10 @@ namespace compabetov2 mostrarDatos(estadisticas); } + private dynamic totalMesSinEnvio(decimal total) + { + } + private decimal totalMes() { List> mes = resumen["mes"]; diff --git a/database/DAO.cs b/database/DAO.cs index 08153d3..9ba8f4f 100644 --- a/database/DAO.cs +++ b/database/DAO.cs @@ -1163,6 +1163,31 @@ namespace compabetov2.database } } + public static SQLiteDataReader conseguirEnvioMesDAO(DateTime fecha) + { + SQLiteDataReader reader = null; + var db_conexion = new Conexion(); + try + { + SQLiteConnection conexion = db_conexion.get_connection(); + + conexion.Open(); + + string sql = "SELECT * FROM envio WHERE fecha LIKE @fecha"; + SQLiteCommand command = new SQLiteCommand(sql, conexion); + command.Parameters.AddWithValue("@fecha", $"%{fecha.Month}/{fecha.Year}%"); + reader = command.ExecuteReader(); + + return reader; + + } + catch (SQLiteException ex) + { + MessageBox.Show(ex.Message); + return reader; + } + } + public static SQLiteDataReader conseguirDetalleVenta(VentaModel venta) { SQLiteDataReader reader = null; diff --git a/database/service.cs b/database/service.cs index 8b2ed1e..9c772e3 100644 --- a/database/service.cs +++ b/database/service.cs @@ -461,5 +461,12 @@ namespace compabetov2.database return productos; } + + public static List conseguirEnvioMes(DateTime fecha) + { + List envios = new List(); + + return envios; + } } }