merma completa
This commit is contained in:
@@ -6,6 +6,7 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
@@ -20,12 +21,13 @@ namespace compabetov2
|
||||
{
|
||||
InitializeComponent();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
getData();
|
||||
llenarPanel();
|
||||
}
|
||||
|
||||
private void llenarPanel()
|
||||
public void llenarPanel()
|
||||
{
|
||||
mermaPanel.Controls.Clear();
|
||||
getData();
|
||||
foreach (Merma merma in mermasList)
|
||||
{
|
||||
TableLayoutPanel carta = new TableLayoutPanel();
|
||||
@@ -43,7 +45,7 @@ namespace compabetov2
|
||||
fecha.Text = merma.fecha;
|
||||
fecha.Dock = DockStyle.Fill;
|
||||
fecha.TextAlign = ContentAlignment.MiddleLeft;
|
||||
fecha.Font = new Font(fecha.Font.FontFamily, 20, FontStyle.Bold);
|
||||
fecha.Font = new Font(fecha.Font.FontFamily, 16, FontStyle.Bold);
|
||||
|
||||
TableLayoutPanel panelBotones = new TableLayoutPanel();
|
||||
panelBotones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
|
||||
@@ -60,6 +62,12 @@ namespace compabetov2
|
||||
btnVer.BackColor = Color.FromArgb(33, 90, 255);
|
||||
btnVer.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnVer.ForeColor = Color.White;
|
||||
btnVer.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
verMerma ver = new verMerma(merma);
|
||||
ver.Owner = this;
|
||||
ver.Show();
|
||||
});
|
||||
|
||||
Button btnEditar = new Button();
|
||||
btnEditar.Text = "Editar";
|
||||
@@ -69,6 +77,12 @@ namespace compabetov2
|
||||
btnEditar.BackColor = Color.FromArgb(33, 90, 255);
|
||||
btnEditar.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnEditar.ForeColor = Color.White;
|
||||
btnEditar.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
ActualizarMerma ver = new ActualizarMerma(merma,this);
|
||||
ver.Owner = this;
|
||||
ver.Show();
|
||||
});
|
||||
|
||||
|
||||
Button btnEliminar = new Button();
|
||||
@@ -79,6 +93,18 @@ namespace compabetov2
|
||||
btnEliminar.FlatAppearance.BorderSize = 0;
|
||||
btnEliminar.Font = new Font(btnVer.Font.FontFamily, 16);
|
||||
btnEliminar.ForeColor = Color.White;
|
||||
btnEliminar.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
DialogResult result = MessageBox.Show("¿Está seguro de que desea eliminar este registro?",
|
||||
"Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
if (service.eliminarMerma(merma))
|
||||
{
|
||||
llenarPanel();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
panelBotones.Controls.Add(btnVer,0,0);
|
||||
@@ -129,5 +155,12 @@ namespace compabetov2
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnAgregar_Click(object sender, EventArgs e)
|
||||
{
|
||||
agregarmermas agregarmermas = new agregarmermas(this);
|
||||
agregarmermas.Owner = this;
|
||||
agregarmermas.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user