subir cambios
This commit is contained in:
@@ -158,8 +158,6 @@ namespace compabetov2
|
||||
{
|
||||
llenarPanel();
|
||||
ImprimirTicketConcluido(envio);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+8
-1
@@ -36,6 +36,8 @@ namespace compabetov2
|
||||
resumen = service.estadisticas(fechaBuscar);
|
||||
List<DetalleVentaModel> productosMes = estadisticasMes();
|
||||
List<DetalleVentaModel> productosDia = estadisticasDia();
|
||||
decimal totalmes = totalMes();
|
||||
decimal totaldia = totalDia();
|
||||
|
||||
Dictionary<string,dynamic> estadisticas = new Dictionary<string, dynamic>
|
||||
{
|
||||
@@ -43,7 +45,8 @@ namespace compabetov2
|
||||
{ "productos", productosMes },
|
||||
{ "productoMasVendido", prodctoMasVendido(productosMes) },
|
||||
{ "mejorVendedor", mejorVenderdorMes() },
|
||||
{ "totalMes", totalMes() },
|
||||
{ "totalMes", totalmes },
|
||||
{ "totalMesSinEnvio", totalMesSinEnvio(totalmes) },
|
||||
}
|
||||
},
|
||||
{ "dia", new Dictionary<string, dynamic>{
|
||||
@@ -57,6 +60,10 @@ namespace compabetov2
|
||||
mostrarDatos(estadisticas);
|
||||
}
|
||||
|
||||
private dynamic totalMesSinEnvio(decimal total)
|
||||
{
|
||||
}
|
||||
|
||||
private decimal totalMes()
|
||||
{
|
||||
List<Dictionary<string, dynamic>> mes = resumen["mes"];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -461,5 +461,12 @@ namespace compabetov2.database
|
||||
|
||||
return productos;
|
||||
}
|
||||
|
||||
public static List<Envio> conseguirEnvioMes(DateTime fecha)
|
||||
{
|
||||
List<Envio> envios = new List<Envio>();
|
||||
|
||||
return envios;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user