estadisticas en proceso
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
using compabetov2.database;
|
||||
using compabetov2.database.modelos;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace compabetov2
|
||||
{
|
||||
public partial class RegistroVentas : Form
|
||||
{
|
||||
List<VentaModel> ventas;
|
||||
Estadiscticas ventanaPadre;
|
||||
public RegistroVentas(List<VentaModel> ventas,Estadiscticas ventanaPadre)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.ventanaPadre = ventanaPadre;
|
||||
this.ventas = ventas;
|
||||
llenarPanel();
|
||||
}
|
||||
|
||||
private void llenarPanel()
|
||||
{
|
||||
foreach(VentaModel venta in ventas)
|
||||
{
|
||||
TableLayoutPanel carta = new TableLayoutPanel();
|
||||
carta.ColumnCount = 1;
|
||||
carta.RowCount = 2;
|
||||
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 75F));
|
||||
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
|
||||
carta.Width = 700;
|
||||
carta.Height = 170;
|
||||
|
||||
FlowLayoutPanel infoPanel = new FlowLayoutPanel();
|
||||
infoPanel.FlowDirection = FlowDirection.TopDown;
|
||||
infoPanel.Dock = DockStyle.Fill;
|
||||
|
||||
Label lbFecha = new Label();
|
||||
lbFecha.Text = $"Fecha: {venta.fecha}";
|
||||
lbFecha.Font = new Font(lbFecha.Font.FontFamily, 12);
|
||||
lbFecha.Width = 700;
|
||||
|
||||
Label lbResponzable = new Label();
|
||||
lbResponzable.Text = $"Responzable: {venta.responzable}";
|
||||
lbResponzable.Font = new Font(lbResponzable.Font.FontFamily, 12);
|
||||
lbResponzable.Width = 700;
|
||||
|
||||
Label lbTotal = new Label();
|
||||
lbTotal.Text = $"Total: {venta.total}";
|
||||
lbTotal.Font = new Font(lbTotal.Font.FontFamily, 12);
|
||||
lbTotal.Width = 700;
|
||||
|
||||
TableLayoutPanel botonesPanel = new TableLayoutPanel();
|
||||
botonesPanel.RowCount = 1;
|
||||
botonesPanel.ColumnCount = 4;
|
||||
botonesPanel.Dock = DockStyle.Fill;
|
||||
botonesPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
botonesPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
botonesPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
botonesPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
botonesPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
|
||||
Button btnDetalles = new Button();
|
||||
btnDetalles.Text = "Detalles";
|
||||
btnDetalles.Dock = DockStyle.Fill;
|
||||
btnDetalles.FlatStyle = FlatStyle.Flat;
|
||||
btnDetalles.FlatAppearance.BorderSize = 0;
|
||||
btnDetalles.BackColor = Color.FromArgb(33, 90, 255);
|
||||
btnDetalles.Font = new Font(btnDetalles.Font.FontFamily, 16);
|
||||
btnDetalles.ForeColor = Color.White;
|
||||
btnDetalles.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
});
|
||||
|
||||
infoPanel.Controls.Add(lbFecha);
|
||||
infoPanel.Controls.Add(lbTotal);
|
||||
infoPanel.Controls.Add(lbResponzable);
|
||||
|
||||
botonesPanel.Controls.Add(btnDetalles, 0, 0);
|
||||
|
||||
carta.Controls.Add(infoPanel, 0, 0);
|
||||
carta.Controls.Add(botonesPanel, 0, 1);
|
||||
|
||||
panelVentas.Controls.Add(carta);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnMenos_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnMas_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user