49 lines
1.4 KiB
C#
49 lines
1.4 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 datosEnvio : Form
|
|
{
|
|
private Envio envio;
|
|
List<DetalleEnvioModel> detallesEnvio;
|
|
vender ventanaPadre;
|
|
public datosEnvio(Envio envio, List<DetalleEnvioModel> detallesEnvio, vender ventanaPadre)
|
|
{
|
|
InitializeComponent();
|
|
this.envio = envio;
|
|
this.detallesEnvio = detallesEnvio;
|
|
this.ventanaPadre = ventanaPadre;
|
|
}
|
|
|
|
private void btnAceptar_Click(object sender, EventArgs e)
|
|
{
|
|
envio.cliente = txtCliente.Text;
|
|
envio.direccion = txtDireccion.Text;
|
|
envio.telefono = txtTelefono.Text;
|
|
if (service.crearEnvio(envio, detallesEnvio))
|
|
{
|
|
MessageBox.Show("Envio hecho");
|
|
ventanaPadre.ImprimirTicketEnvio();
|
|
ventanaPadre.eliminarProductosTocket();
|
|
ventanaPadre.llenarLayout();
|
|
ventanaPadre.total = 0;
|
|
}
|
|
}
|
|
|
|
private void btnCancelar_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
}
|
|
}
|