public Boolean ValidaCPF(string strValida) { clsFuncionario teste = new clsFuncionario(); clsFuncionarioBLL teste1 = new clsFuncionarioBLL(); teste.CPF_Funcionario = strValida; DataTable dt = new DataTable(); dt = teste1.SelecionaFuncionario(teste); try { if (dt.Rows.Count > 0) { return(false); } } catch (Exception) { MessageBox.Show("Falha ao consultar CPF do Funcionario"); } return(true); }
public void preenchegrid() { clsFuncionario teste = new clsFuncionario(); clsFuncionarioBLL teste1 = new clsFuncionarioBLL(); teste1.SelecionaFuncionario(teste); }
private void mtxtBuscaPorCPF_TextChanged(object sender, EventArgs e) { clsFuncionario teste = new clsFuncionario(); clsFuncionarioBLL teste1 = new clsFuncionarioBLL(); teste.CPF_Funcionario = mtxtBuscaPorCPF.Text.ToString(); dtgv_gravacao.DataSource = teste1.SelecionaFuncionario(teste); }
private void Funcionario_Load(object sender, EventArgs e) { clsFuncionario teste = new clsFuncionario(); clsFuncionarioBLL testte1 = new clsFuncionarioBLL(); dtgv_gravacao.DataSource = testte1.SelecionaFuncionario(teste); btn_alterar.Enabled = false; btn_excluir.Enabled = false; valida_cargo = false; }