public void Funcionario_Gravar(string nome, int cep, int numero, string comp, string telfixo, string telcel, string cpf, string id, string dtnascimento, string admissao, string funcao, string regprofissional) { FUNCIONARIOTableAdapter funcionario = new FUNCIONARIOTableAdapter(); funcionario.Inserir(nome, cep, numero, comp, telfixo, telcel, cpf, id, dtnascimento, admissao, funcao, regprofissional); }
public void Funcionario_Editar(string nome, int cep, int numero, string comp, string telfixo, string telcel, string cpf, string identidade, string dtnascimento, string admissao, string funcao, string regprofissional, int idfuncionario, int originalID) { FUNCIONARIOTableAdapter funcionario = new FUNCIONARIOTableAdapter(); funcionario.AtualizarFuncionario(nome, cep, numero, comp, telfixo, telcel, cpf, identidade, dtnascimento, admissao, funcao, regprofissional, originalID); }
public void Funcionario_Excluir(int idfuncionario) { FUNCIONARIOTableAdapter funcionario = new FUNCIONARIOTableAdapter(); funcionario.DeletarFuncionario(idfuncionario); }
public string Usuarios_RetornaNome(int idfuncionario) { FUNCIONARIOTableAdapter fun = new FUNCIONARIOTableAdapter(); var teste = fun.RetornaNomeFuncionarioporId(idfuncionario); if (teste == null) return ""; else return teste.ToString(); }
public string Funcionario_RetornaNomeJaCadastrado(string nome) { nome = nome.ToUpper(); nome = "%" + nome + "%"; FUNCIONARIOTableAdapter funcionario = new FUNCIONARIOTableAdapter(); string NomedaTabela = ""; var pesquisa = funcionario.RetornarNomeFuncionario(nome); if (pesquisa != null) { NomedaTabela = pesquisa.ToString(); } return NomedaTabela; }
public FUNCIONARIO() { Cargo = new OCUPACAO(); BDFuncionario = new FUNCIONARIOTableAdapter(); }
public string Funcionarios_RetornaNomePorID(int id) { FUNCIONARIOTableAdapter func = new FUNCIONARIOTableAdapter(); string nome = func.RetrornaNomeFuncionarioPorID(id).ToString(); return nome; }
private void IncluirUsuario() { FUNCIONARIOTableAdapter func = new FUNCIONARIOTableAdapter(); ACESSOSISTEMATableAdapter acesso = new ACESSOSISTEMATableAdapter(); DataTable funcionarios = func.GetData(); DialogResult resultado = MessageBox.Show("Atenção","Confirmar inclusão?",MessageBoxButtons.YesNo); int id = 0; if (resultado == System.Windows.Forms.DialogResult.Yes) { for (int i = 0; i < funcionarios.Rows.Count; i++) { DataRow linha = funcionarios.Rows[i]; if (txNome.Text.ToUpper().Equals(linha["NOME"].ToString())) { id = int.Parse(linha[0].ToString()); break; } } if (txSenha.Text.Equals(txConfirmarSenha.Text) && txSenha.Text != "" && txConfirmarSenha.Text != "" && txNome.Text != "" && txMatricula.Text != "" && txSenha.Text.Length > 5) { if (id == 0) { func.Insert(txNome.Text.ToUpper(), txMatricula.Text); id = (int)func.RetornaIDPorNome(txNome.Text.ToUpper()); acesso.Insert(id, (int)cbAcesso.SelectedValue, (int)cbSetor.SelectedValue, txLogin.Text, txSenha.Text); MessageBox.Show("Ok!"); btnLimpar.PerformClick(); } else MessageBox.Show("Usuario já cadastrado"); } else { MessageBox.Show("Senhas não conferem!!\n Ou faltam alguns dados..."); } } }