merma completa

This commit is contained in:
carlos
2024-01-18 23:17:35 -06:00
parent a438eb1914
commit f084bb8e20
24 changed files with 895 additions and 33 deletions
+51
View File
@@ -0,0 +1,51 @@
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 ActualizarMerma : Form
{
private Merma merma;
private mermas ventanaPadre;
public ActualizarMerma(Merma merma, mermas ventanaPadre)
{
InitializeComponent();
this.merma = merma;
this.ventanaPadre = ventanaPadre;
llenarCampos();
}
private void llenarCampos()
{
txtDescripcion.Text = merma.razon;
txtResponsable.Text = merma.responsable;
dtFecha.Text = merma.fecha;
}
private void btnAgregar_Click(object sender, EventArgs e)
{
Merma nuevaMerma = new Merma(merma.idMerma,dtFecha.Text,txtResponsable.Text,txtDescripcion.Text);
if (service.actualizarMerma(nuevaMerma))
{
MessageBox.Show("Merma actualizada");
ventanaPadre.llenarPanel();
Close();
}
}
private void txtDescripcion_TextChanged(object sender, EventArgs e)
{
}
}
}