public static DataTable recuperarTodos() { DadosSistema Geral = null; DataTable tblDados = null; tblDados = new DataTable(); try { Geral = new DadosSistema(); SqlParameter[] parParameter = new SqlParameter[2]; parParameter[0] = new SqlParameter(); parParameter[0].ParameterName = "@OPERACAO"; parParameter[0].SqlDbType = SqlDbType.Char; parParameter[0].SqlValue = "T"; parParameter[1] = new SqlParameter(); parParameter[1].ParameterName = "@NUMERO"; parParameter[1].SqlDbType = SqlDbType.Int; parParameter[1].SqlValue = 1; tblDados = Geral.getDadosTable(parParameter, "CARGO_S_D"); } catch (Exception ex) { throw new Exception(ex.Message); } return(tblDados); }
public static DataTable recuperarSenha(string login, string senha) { DadosSistema Geral = null; DataTable tblDados = null; tblDados = new DataTable(); try { Geral = new DadosSistema(); SqlParameter[] parParameter = new SqlParameter[2]; parParameter[0] = new SqlParameter(); parParameter[0].ParameterName = "@SENHA"; parParameter[0].SqlDbType = SqlDbType.Char; parParameter[0].SqlValue = senha; parParameter[1] = new SqlParameter(); parParameter[1].ParameterName = "@REGISTRO"; parParameter[1].SqlDbType = SqlDbType.Char; parParameter[1].SqlValue = login; tblDados = Geral.getDadosTable(parParameter, "FUNCIONARIO_SENHA"); } catch (Exception ex) { throw new Exception(ex.Message); } return(tblDados); }
public static DataTable recuperarTodosFiltro(string filtro) { DadosSistema Geral = null; DataTable tblDados = null; tblDados = new DataTable(); try { Geral = new DadosSistema(); SqlParameter[] parParameter = new SqlParameter[2]; parParameter[0] = new SqlParameter(); parParameter[0].ParameterName = "@OPERACAO"; parParameter[0].SqlDbType = SqlDbType.Char; parParameter[0].SqlValue = "P"; parParameter[1] = new SqlParameter(); parParameter[1].ParameterName = "@NOME"; parParameter[1].SqlDbType = SqlDbType.Text; parParameter[1].SqlValue = filtro; tblDados = Geral.getDadosTable(parParameter, "CARGO_P"); } catch (Exception ex) { throw new Exception(ex.Message); } return(tblDados); }
public void Salvar(clsFuncionario funcionario) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO_REGISTRO", "@NOME", "@RG", "@SEXO", "@ENDERECO", "@SETOR", "@CARGO", "@SENHA", "@DATA_ADMISSAO", "@DATA_DEMISSAO" }; try { dados.Executar("FUNCIONARIO_I_A", parametros, "I", funcionario.numeroRegistro, funcionario.nome, funcionario.rg, funcionario.sexo, funcionario.endereco, funcionario.setor, funcionario.cargo, funcionario.senha, funcionario.dataAdmissao, funcionario.dataDemissao); } catch (Exception ex) { throw new Exception(ex.Message); } }
public static DataTable Setores() { DadosSistema Geral = null; DataTable tblDados = null; tblDados = new DataTable(); try { Geral = new DadosSistema(); SqlParameter[] parParameter = new SqlParameter[1]; parParameter[0] = new SqlParameter(); parParameter[0].ParameterName = "@OPERACAO"; parParameter[0].SqlDbType = SqlDbType.Char; parParameter[0].SqlValue = "SETOR"; tblDados = Geral.getDadosTable(parParameter, "SETOR_LISTA"); } catch (Exception ex) { throw new Exception(ex.Message); } return(tblDados); }
private void AdicionaDadosDictConfig(Estabelecimento estab) { DadosSistema Dados = new DadosSistema(); Dados.idEstabelecimento = estab.Id.Value; CustomPrincipal user = MetodosGlobais.CustomPrincipalLogado(estab); try { ListConfig.Add(estab.Id.Value, Dados); } catch (Exception e) { MetodosGlobais.SaveExceptionError(e, "GetDadosSistema/AdicionaDadosDictConfig"); } }
public void Excluir(clsCargo cargo) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO" }; try { dados.Executar("CARGO_S_D", parametros, "E", cargo.numero); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Excluir(clsSetor setor) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO" }; try { dados.Executar("SETOR_S_D", parametros, "E", setor.numero); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Excluir(clsFuncionario funcionario) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@REGISTRO" }; try { dados.Executar("FUNCIONARIO_S_D", parametros, "E", funcionario.numeroRegistro); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Alterar(clsCargo cargo) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO", "@NOME" }; try { dados.Executar("CARGO_I_A", parametros, "A", cargo.numero, cargo.nome); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Alterar(clsSetor setor) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO", "@NOME" }; try { dados.Executar("SETOR_I_A", parametros, "A", setor.numero, setor.nome); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Salvar(clsFalta falta) { DadosSistema dados = new DadosSistema(); string[] parametros = { "@OPERACAO", "@NUMERO_REGISTRO", "@TIPO", "@DURACAO", "@DATA" }; try { dados.Executar("FALTA_I_A", parametros, "I", falta.funcionario, falta.tipo, falta.duracao, falta.data); } catch (Exception ex) { throw new Exception(ex.Message); } }
public DataTable FuncionarioRelatorio(DateTime data1, DateTime data2, string tipo, string operacao) { DadosSistema Geral = null; DataTable tblDados = null; tblDados = new DataTable(); try { Geral = new DadosSistema(); SqlParameter[] parParameter = new SqlParameter[4]; parParameter[0] = new SqlParameter(); parParameter[0].ParameterName = "@OPERACAO"; parParameter[0].SqlDbType = SqlDbType.Char; parParameter[0].SqlValue = operacao; parParameter[1] = new SqlParameter(); parParameter[1].ParameterName = "@DATA1"; parParameter[1].SqlDbType = SqlDbType.DateTime; parParameter[1].SqlValue = data1; parParameter[2] = new SqlParameter(); parParameter[2].ParameterName = "@DATA2"; parParameter[2].SqlDbType = SqlDbType.DateTime; parParameter[2].SqlValue = data2; parParameter[3] = new SqlParameter(); parParameter[3].ParameterName = "@TIPO"; parParameter[3].SqlDbType = SqlDbType.Char; parParameter[3].SqlValue = tipo; tblDados = Geral.getDadosTable(parParameter, "RELATORIO"); } catch (Exception ex) { throw new Exception(ex.Message); } return(tblDados); }