예제 #1
0
        public void CsFuncaoParemetroColecao(CommandType commandType, string oleDbCommand, CsFuncao csFuncao)
        {
            csCommand = new CsCommand();

            csCommand.ParameterCollection_Clear();

            csCommand.ParameterCollection_Add("@Nome", csFuncao.Nome);
            csCommand.ParameterCollection_Add("@Descricao", csFuncao.Descricao);

            csCommand.ExecuteCommandNonQuery(commandType, oleDbCommand);
        }
예제 #2
0
        public void CsEmpresaParemetroColecao(CommandType commandType, string oleDbCommand, CsEmpresa csEmpresa)
        {
            csCommand = new CsCommand();

            csCommand.ParameterCollection_Clear();

            csCommand.ParameterCollection_Add("@Nome", csEmpresa.Nome);
            csCommand.ParameterCollection_Add("@Cnpj", csEmpresa.Cnpj);
            csCommand.ParameterCollection_Add("@Telefone", csEmpresa.Telefone);
            csCommand.ParameterCollection_Add("@Endereco", csEmpresa.Endereco);
            csCommand.ParameterCollection_Add("@Id", csEmpresa.Id);

            csCommand.ExecuteCommandNonQuery(commandType, oleDbCommand);
        }
예제 #3
0
        public void CsPrestaServicoParemetroColecao(CommandType commandType, string oleDbCommand, CsPrestaServico csPrestaServico)
        {
            csCommand = new CsCommand();

            csCommand.ParameterCollection_Clear();

            csCommand.ParameterCollection_Add("@FkEmpresa", csPrestaServico.FkEmpresa.Id);
            csCommand.ParameterCollection_Add("@FkFuncionario", csPrestaServico.FkFuncionario.Id);
            csCommand.ParameterCollection_Add("@DataDeRegistro", csPrestaServico.DataRegistro);
            csCommand.ParameterCollection_Add("@Entrada", csPrestaServico.Entrada);
            csCommand.ParameterCollection_Add("@Intervalo", csPrestaServico.Intervalo);
            csCommand.ParameterCollection_Add("@Saida", csPrestaServico.Saida);
            csCommand.ParameterCollection_Add("@HorasTrabalhadas", csPrestaServico.HorasTrabalhadas);
            csCommand.ParameterCollection_Add("@HorasExtras", csPrestaServico.HorasExtras);
            csCommand.ParameterCollection_Add("@TotalHoras", csPrestaServico.TotalHoras);

            csCommand.ParameterCollection_Add("@Id", csPrestaServico.Id);

            csCommand.ExecuteCommandNonQuery(commandType, oleDbCommand);
        }
예제 #4
0
        public void FuncionarioParametroColecao(CommandType commandType, string oleDbCommand, CsFuncionario csFuncionario)
        {
            csCommand = new CsCommand();

            csCommand.ParameterCollection_Clear();

            csCommand.ParameterCollection_Add("@Matricula", csFuncionario.Matricula);
            csCommand.ParameterCollection_Add("@Nome", csFuncionario.Nome);
            csCommand.ParameterCollection_Add("@FkFuncao", csFuncionario.FkFuncao);
            csCommand.ParameterCollection_Add("@DataAdmissao", csFuncionario.DataAdmissao);
            csCommand.ParameterCollection_Add("@CargaHoraria", csFuncionario.CargaHoraria);
            csCommand.ParameterCollection_Add("@Id", csFuncionario.Id);

            csCommand.ExecuteCommandNonQuery(commandType, oleDbCommand);
        }
예제 #5
0
        public CsCollectionPrestaServico CsPrestaServicoParametroColecao_Returno(CommandType commandType, string oleDbCommand, string where, string name)
        {
            csPrestaServico           = new CsPrestaServico();
            csCollectionPrestaServico = new CsCollectionPrestaServico();
            csCommand = new CsCommand();

            csCommand.ParameterCollection_Clear();

            if (!(String.IsNullOrEmpty(name)))
            {
                csCommand.ParameterCollection_Add("@Name", name);
            }

            DataTable dataTable = csCommand.ExecuteCommandConsult(commandType, oleDbCommand);

            foreach (DataRow linha in dataTable.Rows)
            {
                csCollectionPrestaServico.Add(csPrestaServico.CsPrestaServicoDataGridView(linha));
            }

            return(csCollectionPrestaServico);
        }