Levelcode-IBRCAD/IBRCAD/frm_consultacnpjreceita.cs

50 lines
1.4 KiB
C#

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 IBRCAD
{
public partial class frm_consultacnpjreceita : Form
{
public frm_consultacnpjreceita()
{
InitializeComponent();
}
private void pb_close_Click(object sender, EventArgs e)
{
this.Close();
}//end fechar
private void obtercnpj()
{
var cnpj = Empresa.ObterCnpj(mskcnpj.Text);
if (cnpj != null)
{
this.txtnome.Text = cnpj.nome;
this.txtsituacao.Text = cnpj.situacao;
this.txtabertura.Text = cnpj.abertura;
this.txtmotivo.Text = cnpj.motivo_situacao;
this.txtlogradouro.Text = cnpj.logradouro;
this.txtnumero.Text = cnpj.numero;
this.txtcomplemento.Text = cnpj.complemento;
this.txtbairro.Text = cnpj.bairro;
this.txtcep.Text = cnpj.cep;
this.txtmunicipio.Text = cnpj.municipio;
this.txtestado.Text = cnpj.uf;
}
}
private void btn_seach_Click(object sender, EventArgs e)
{
this.obtercnpj();
}
}
}