excodc#1
excodc#1
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace bacnodados
{
public partial class frmFunc : Form
{
private int codfunc = 0;
public frmFunc()
{
InitializeComponent();
}
while (dr.Read())
{
cboCargos.Items.Add(dr["cargo"]);
}
}
catch (SqlException x)
{
MessageBox.Show(x.Message, "Atenção");
}
cn.Close();
}
private void limpaTela()
{
txtNome.Clear();
cboCargos.SelectedIndex = -1;
txtSalario.Clear();
txtEmail.Clear();
txtNome.Focus();
}
private void btnSair_Click(object sender, EventArgs e)
{
this.Close();
}
try
{
cn.Open();
SqlCommand cd = new SqlCommand();
try
{
cn.Open();
SqlCommand cd = new SqlCommand();
catch (SqlException x)
{
MessageBox.Show(x.Message, "Atenção");
}
limpaTela();