using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using NastiAplicacion.Vistas.Facturacion;

namespace NastiAplicacion.General
{
public partial class CtlDatoComercial : UserControl
{
public CtlDatoComercial()
{
InitializeComponent();
}

private void labelControl4_Click(object sender, EventArgs e)
{

}

public void AsignaDatos(DATOCOMERCIAL datoComercial)
{
this.textEditDireccion.EditValue = datoComercial.DIRECCION;
this.textEditRazonSocial.EditValue = datoComercial.RAZONSOCIAL;
this.textEditLocalidad.EditValue = datoComercial.DESCRIPCIONLOCALIDAD;
this.textEditEmail.EditValue = datoComercial.EMAIL;
this.textEditTelefono.EditValue = datoComercial.TELEFONO;
this.textEditFax.EditValue = datoComercial.FAX;
this.textEditResolucion.EditValue = datoComercial.NUMERORESOLUCION;

}

public void limpiar()
{
this.textEditDireccion.EditValue=String.Empty;
this.textEditTelefono.EditValue = String.Empty;
this.textEditRazonSocial.EditValue = String.Empty;
this.textEditFax.EditValue = String.Empty;
this.textEditLocalidad.EditValue = String.Empty;
this.textEditResolucion.EditValue = String.Empty;
this.textEditEmail.EditValue = String.Empty;
}

public DATOCOMERCIAL ObtenerDatos()
{
DATOCOMERCIAL datoComercial = new DATOCOMERCIAL();
datoComercial.DIRECCION = Convert.ToString(this.textEditDireccion.EditValue);
datoComercial.TELEFONO = Convert.ToString(this.textEditDireccion.EditValue);
datoComercial.RAZONSOCIAL = Convert.ToString(this.textEditRazonSocial.EditValue);
datoComercial.FAX = Convert.ToString(this.textEditFax.EditValue);
datoComercial.DESCRIPCIONLOCALIDAD = Convert.ToString(this.textEditLocalidad.EditValue);
datoComercial.NUMERORESOLUCION = Convert.ToString(this.textEditResolucion.EditValue);
datoComercial.EMAIL =Convert.ToString(this.textEditEmail.EditValue);
return datoComercial;
}
}
}