bajar cambios
This commit is contained in:
Binary file not shown.
+31
-2
@@ -43,18 +43,47 @@ namespace compabetov2
|
||||
{ "productos", productosMes },
|
||||
{ "productoMasVendido", prodctoMasVendido(productosMes) },
|
||||
{ "mejorVendedor", mejorVenderdorMes() },
|
||||
{ "totalMes", totalMes() },
|
||||
}
|
||||
},
|
||||
{ "dia", new Dictionary<string, dynamic>{
|
||||
{ "productos", productosDia },
|
||||
{ "productoMasVendido", prodctoMasVendido(productosDia) },
|
||||
{ "mejorVendedor", mejorVenderdorDia() },
|
||||
{ "totalDia", totalDia()}
|
||||
}
|
||||
}
|
||||
};
|
||||
mostrarDatos(estadisticas);
|
||||
}
|
||||
|
||||
private decimal totalMes()
|
||||
{
|
||||
List<Dictionary<string, dynamic>> mes = resumen["mes"];
|
||||
|
||||
return calcularTotal(mes);
|
||||
}
|
||||
|
||||
private decimal totalDia()
|
||||
{
|
||||
List<Dictionary<string, dynamic>> dia = resumen["dia"];
|
||||
|
||||
return calcularTotal(dia);
|
||||
}
|
||||
|
||||
private decimal calcularTotal(List<Dictionary<string, dynamic>> resumen)
|
||||
{
|
||||
decimal total = 0;
|
||||
foreach (Dictionary<string, dynamic> venta_y_detalles in resumen)
|
||||
{
|
||||
VentaModel venta = venta_y_detalles["venta"];
|
||||
|
||||
total += venta.total;
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
private List<DetalleVentaModel> estadisticasDia()
|
||||
{
|
||||
//solo copie y pegue le metodo estadisticas dia y cambie el key en resumen de mes a dia
|
||||
@@ -133,7 +162,7 @@ namespace compabetov2
|
||||
dgvMes.Rows.Add(nuevaFila);
|
||||
}
|
||||
|
||||
lbTotalMes.Text = $"Total de mes: ${totalVendidoMes}";
|
||||
lbTotalMes.Text = $"Total de mes: ${estadisticas["mes"]["totalMes"]}";
|
||||
lbProductoMes.Text = $"Producto mas vendido: {estadisticas["mes"]["productoMasVendido"]}";
|
||||
lbVendedorMes.Text = $"Mejor vendedor: {estadisticas["mes"]["mejorVendedor"]}";
|
||||
|
||||
@@ -168,7 +197,7 @@ namespace compabetov2
|
||||
dgvDia.Rows.Add(nuevaFila);
|
||||
}
|
||||
|
||||
lbTotalDia.Text = $"Total de dia: ${totalVendidoDia}";
|
||||
lbTotalDia.Text = $"Total de dia: ${estadisticas["dia"]["totalDia"]}";
|
||||
lbProductDia.Text = $"Producto mas vendido: {estadisticas["dia"]["productoMasVendido"]}";
|
||||
lbVendedorDia.Text = $"Mejor vendedor: {estadisticas["dia"]["mejorVendedor"]}";
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
02f8dd8032cdd900c4c7a30e0d2445335e555a7c7084d974934c829cadebfeb5
|
||||
139b4fcf6da88d898310192ac1940949355dbb22e52e62b98f67cedee395686d
|
||||
|
||||
@@ -96,3 +96,4 @@ C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.exe
|
||||
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.pdb
|
||||
>>>>>>> c401f0a5d425880eadaf1bd65205d8559b5d39bc
|
||||
C:\Users\Googl\Documents\compabetoOG\obj\Debug\compabetov2.Ventas.datosEnvio.resources
|
||||
C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.Ventas.datosEnvio.resources
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user