Files
compabetoOG/Ventas/datosCuenta.cs
T
2024-02-03 06:58:01 -06:00

51 lines
1.3 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.Ventas
{
public partial class datosCuenta : Form
{
private Cuenta ventaModel;
private List<DetalleCuentaModel> detalles;
private vender ventanaPadre;
public datosCuenta(Cuenta ventaModel, List<DetalleCuentaModel> detalles, vender ventanaPadre)
{
InitializeComponent();
this.ventaModel = ventaModel;
this.detalles = detalles;
this.ventanaPadre = ventanaPadre;
}
private void datosCuenta_Load(object sender, EventArgs e)
{
}
private void btnAceptar_Click(object sender, EventArgs e)
{
if (service.crearCuenta(ventaModel, detalles))
{
MessageBox.Show("Fiado");
ventanaPadre.eliminarProductosTocket();
ventanaPadre.llenarLayout();
ventanaPadre.total = 0;
Close();
}
}
private void btnCancelar_Click(object sender, EventArgs e)
{
Close();
}
}
}