42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
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 agregarmermas : Form
|
|
{
|
|
private mermas ventanaPadre;
|
|
public agregarmermas(mermas ventanaPadre)
|
|
{
|
|
InitializeComponent();
|
|
this.ventanaPadre = ventanaPadre;
|
|
}
|
|
|
|
private void label2_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btnAgregar_Click(object sender, EventArgs e)
|
|
{
|
|
string descripcion = txtDescripcion.Text;
|
|
string fecha = dtFecha.Text;
|
|
string responsable = txtResponsable.Text;
|
|
Merma merma = new Merma(-1,fecha,responsable,descripcion);
|
|
if (service.insertarMerma(merma)) {
|
|
ventanaPadre.llenarPanel();
|
|
Close();
|
|
}
|
|
}
|
|
}
|
|
}
|