envios a medio terminar
This commit is contained in:
+47
-1
@@ -1,4 +1,5 @@
|
||||
using compabetov2.database.modelos;
|
||||
using compabetov2.database;
|
||||
using compabetov2.database.modelos;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -17,9 +18,44 @@ namespace compabetov2
|
||||
public envios(LoginModel loginPrincipal)
|
||||
{
|
||||
InitializeComponent();
|
||||
llenarPanel();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
}
|
||||
|
||||
private void llenarPanel()
|
||||
{
|
||||
panelEnvio.Controls.Clear();
|
||||
List<Envio> envios = service.conseguirEnvio();
|
||||
panelEnvio.BackColor = Color.Aqua;
|
||||
foreach(Envio envio in envios)
|
||||
{
|
||||
TableLayoutPanel carta = new TableLayoutPanel();
|
||||
carta.ColumnCount = 1;
|
||||
carta.RowCount = 2;
|
||||
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 80F));
|
||||
carta.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
carta.Width = 700;
|
||||
carta.Height = 150;
|
||||
carta.BackColor = Color.Gray;
|
||||
|
||||
FlowLayoutPanel infoPanel = new FlowLayoutPanel();
|
||||
infoPanel.FlowDirection = FlowDirection.TopDown;
|
||||
infoPanel.Dock = DockStyle.Fill;
|
||||
|
||||
Label lbFecha = new Label();
|
||||
lbFecha.Text = $"Fecha: {envio.fecha}";
|
||||
|
||||
Label lbDireaccion = new Label();
|
||||
lbDireaccion.Text = $"Direccion: {envio.direccion}";
|
||||
|
||||
|
||||
|
||||
|
||||
panelEnvio.Controls.Add(carta);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Cerrar el formulario de ventas
|
||||
@@ -63,5 +99,15 @@ namespace compabetov2
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label4_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void panelEnvio_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user