public void ListarSolicitacoesByUsuario(Entidades.Usuario usu, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[4];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_PRODUTO";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    if (usu.Produtos == null || usu.Produtos.Count == 0)
                    {
                        arParms[1].Value = 0;
                    }
                    else
                    {
                        arParms[1].Value = usu.Produtos.FirstOrDefault().CodigoProduto;
                    }

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_ID_PRODUTO_PRECO";
                    arParms[2].OracleDbType  = OracleDbType.Int64;
                    arParms[2].Direction     = ParameterDirection.Input;
                    if (usu.Produtos == null || usu.Produtos.Count == 0)
                    {
                        arParms[2].Value = 0;
                    }
                    else
                    {
                        arParms[2].Value = usu.Produtos.FirstOrDefault().CodigoItemProduto;
                    }

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_ID_USUARIO";
                    arParms[3].OracleDbType  = OracleDbType.Int64;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = usu.IdUsuario;

                    oConn.Execute("DNAINFO.P_L_PRODUTOS_BY_USUARIO", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void ListarRelatorioAnaliticoUsuario(Entidades.Relatorio.FiltroPesquisa filtro, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[5];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_USUARIO_INCLUSAO";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = filtro.IdUsuarioLogado;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_ID_PRODUTO_PRECO";
                    arParms[2].OracleDbType  = OracleDbType.Int64;
                    arParms[2].Direction     = ParameterDirection.Input;
                    if (filtro.CodigoItemProduto == null || filtro.CodigoItemProduto == string.Empty)
                    {
                        arParms[2].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[2].Value = filtro.CodigoItemProduto;
                    }

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_DATA_INICAL";
                    arParms[3].OracleDbType  = OracleDbType.Date;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = filtro.DataInicialPesquisa;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_DATA_FINAL";
                    arParms[4].OracleDbType  = OracleDbType.Date;
                    arParms[4].Direction     = ParameterDirection.Input;
                    arParms[4].Value         = filtro.DataFinalPesquisa;

                    oConn.Execute("DNAINFO.P_REL_HISTORICO_BY_USUARIO", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#3
0
        public void Listar(DNA.Entidades.Usuario usu, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[5];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_USUARIO";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    if (usu.IdUsuario == 0)
                    {
                        arParms[1].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[1].Value = usu.IdUsuario;
                    }

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_LOGIN";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = usu.LoginUsuario;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_SENHA";
                    arParms[3].OracleDbType  = OracleDbType.Varchar2;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = usu.SenhaUsuario;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_FLAG_ATIVO";
                    arParms[4].OracleDbType  = OracleDbType.Char;
                    arParms[4].Direction     = ParameterDirection.Input;
                    arParms[4].Value         = usu.FlagAtivo;

                    oConn.Execute("DNASITE.P_L_USUARIOS", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void Listar(DNA.Entidades.Cliente cli, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[6];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_CLIENTE";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = cli.IdCliente;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_NOME_RAZAO_SOCIAL";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = cli.NomeRazaoSocial;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_NOME_FANTASIA";
                    arParms[3].OracleDbType  = OracleDbType.Varchar2;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = cli.NomeFantasia;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_NUM_CPF_CNPJ";
                    arParms[4].OracleDbType  = OracleDbType.Varchar2;
                    arParms[4].Direction     = ParameterDirection.Input;
                    arParms[4].Value         = cli.NumeroDocCPFCNPJ;

                    arParms[5] = new OracleParameter();
                    arParms[5].ParameterName = "P_FLAG_ATIVO";
                    arParms[5].OracleDbType  = OracleDbType.Char;
                    arParms[5].Direction     = ParameterDirection.Input;
                    arParms[5].Value         = cli.FlagAtivo;

                    oConn.Execute("DNAINFO.P_L_CLIENTES", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void PesquisaPF(string CPF, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[6];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_CPF";
                    arParms[0].OracleDbType  = OracleDbType.Varchar2;
                    arParms[0].Direction     = ParameterDirection.Input;
                    arParms[0].Value         = CPF;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "R_DADOS_PESSOAIS";
                    arParms[1].OracleDbType  = OracleDbType.RefCursor;
                    arParms[1].Direction     = ParameterDirection.Output;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "R_TELEFONES";
                    arParms[2].OracleDbType  = OracleDbType.RefCursor;
                    arParms[2].Direction     = ParameterDirection.Output;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "R_ENDERECO";
                    arParms[3].OracleDbType  = OracleDbType.RefCursor;
                    arParms[3].Direction     = ParameterDirection.Output;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "R_EMAIL";
                    arParms[4].OracleDbType  = OracleDbType.RefCursor;
                    arParms[4].Direction     = ParameterDirection.Output;

                    arParms[5] = new OracleParameter();
                    arParms[5].ParameterName = "R_QSA";
                    arParms[5].OracleDbType  = OracleDbType.RefCursor;
                    arParms[5].Direction     = ParameterDirection.Output;

                    oConn.Execute("DNAINFO.P_L_WS_RASTREAMENTO_PF_PRATA", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#6
0
        public void PesquisaSearchPJ(Entidades.Cadastral.FiltroPesquisaSearchPJ filtro, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[4];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_NOME";
                    arParms[0].OracleDbType  = OracleDbType.Varchar2;
                    arParms[0].Direction     = ParameterDirection.Input;
                    arParms[0].Value         = filtro.Nome;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_UF";
                    arParms[1].OracleDbType  = OracleDbType.Varchar2;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = filtro.UF;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_CIDADE";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = filtro.Cidade;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "R_CURSOR";
                    arParms[3].OracleDbType  = OracleDbType.RefCursor;
                    arParms[3].Direction     = ParameterDirection.Output;


                    oConn.Execute("DNAINFO.P_L_WS_RASTREAMENTO_SEARCH_PJ", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#7
0
        public void ListarByIdCliente(Entidades.Produto prod, Entidades.Cliente cli, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[4];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_PRODUTO";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = prod.CodigoProduto;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_ID_PRODUTO_PRECO";
                    arParms[2].OracleDbType  = OracleDbType.Int64;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = prod.CodigoItemProduto;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_ID_CLIENTE";
                    arParms[3].OracleDbType  = OracleDbType.Int64;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = cli.IdCliente;

                    oConn.Execute("DNAINFO.P_L_PRODUTOS_BY_CLIENTE", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void ListarPerfilByIdUsuario(DNA.Entidades.PerfilAcesso perf, ref DataTable oDT)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[4];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "V_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = perf.IdPerfilAcessoUsuario;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_ID_PERFIL";
                    arParms[2].OracleDbType  = OracleDbType.Int64;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = perf.IdPerfilAcesso;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_ID_USUARIO";
                    arParms[3].OracleDbType  = OracleDbType.Int64;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = perf.IdUsuario;

                    oConn.Execute("DNAINFO.P_L_USU_PERF_ACESS", arParms, ref oDT);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void PesquisaSearchTelefonePF(Entidades.Cadastral.FiltroPesquisaSearchTelefonePF filtro, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[3];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_DDD";
                    arParms[0].OracleDbType  = OracleDbType.Varchar2;
                    arParms[0].Direction     = ParameterDirection.Input;
                    arParms[0].Value         = filtro.DDD;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_TEL";
                    arParms[1].OracleDbType  = OracleDbType.Varchar2;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = filtro.NumeroTel;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "R_CURSOR";
                    arParms[2].OracleDbType  = OracleDbType.RefCursor;
                    arParms[2].Direction     = ParameterDirection.Output;


                    oConn.Execute("DNAINFO.P_L_WS_RASTREA_SEARCH_TEL_PF", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void PesquisaMoradoresMesmoEndereco(Entidades.Cadastral.FiltroPesquisaMoradoresMesmoEndereco filtro, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[7];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_CEP";
                    arParms[0].OracleDbType  = OracleDbType.Varchar2;
                    arParms[0].Direction     = ParameterDirection.Input;
                    if (filtro.Cep.Trim().Equals(""))
                    {
                        arParms[0].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[0].Value = filtro.Cep;
                    }

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_UF";
                    arParms[1].OracleDbType  = OracleDbType.Varchar2;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = filtro.UF;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_CIDADE";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = filtro.Cidade;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_BAIRRO";
                    arParms[3].OracleDbType  = OracleDbType.Varchar2;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = filtro.Bairro;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_LOGRADOURO";
                    arParms[4].OracleDbType  = OracleDbType.Varchar2;
                    arParms[4].Direction     = ParameterDirection.Input;
                    arParms[4].Value         = filtro.Logradouro;

                    arParms[5] = new OracleParameter();
                    arParms[5].ParameterName = "P_NUMERO";
                    arParms[5].OracleDbType  = OracleDbType.Varchar2;
                    arParms[5].Direction     = ParameterDirection.Input;
                    arParms[5].Value         = filtro.Numero;

                    arParms[6] = new OracleParameter();
                    arParms[6].ParameterName = "R_CURSOR";
                    arParms[6].OracleDbType  = OracleDbType.RefCursor;
                    arParms[6].Direction     = ParameterDirection.Output;


                    oConn.Execute("DNAINFO.P_L_WS_RAST_MORA_MESMO_END", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#11
0
        public void AlterarSenha(int idUsuarioAlteracao, DNA.Entidades.Usuario usu)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[9];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_ID_USUARIO_ALTERADO";
                    arParms[0].OracleDbType  = OracleDbType.Int64;
                    arParms[0].Direction     = ParameterDirection.Input;
                    if (usu.IdUsuario == 0)
                    {
                        arParms[0].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[0].Value = usu.IdUsuario;
                    }

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_ID_USUARIO_ALTERACAO";
                    arParms[1].OracleDbType  = OracleDbType.Int64;
                    arParms[1].Direction     = ParameterDirection.Input;
                    arParms[1].Value         = idUsuarioAlteracao;

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_NOVO_NOME";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    if (usu.NomeUsuario.Length == 0)
                    {
                        arParms[2].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[2].Value = usu.NomeUsuario;
                    }

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_NOVO_LOGIN";
                    arParms[3].OracleDbType  = OracleDbType.Varchar2;
                    arParms[3].Direction     = ParameterDirection.Input;
                    if (usu.LoginUsuario.Length == 0)
                    {
                        arParms[3].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[3].Value = usu.LoginUsuario;
                    }

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_NOVA_SENHA";
                    arParms[4].OracleDbType  = OracleDbType.Varchar2;
                    arParms[4].Direction     = ParameterDirection.Input;
                    if (usu.SenhaUsuario.Length == 0)
                    {
                        arParms[4].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[4].Value = usu.SenhaUsuario;
                    }

                    arParms[5] = new OracleParameter();
                    arParms[5].ParameterName = "P_NOVO_EMAIL1";
                    arParms[5].OracleDbType  = OracleDbType.Varchar2;
                    arParms[5].Direction     = ParameterDirection.Input;
                    if (usu.Email1.Length == 0)
                    {
                        arParms[5].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[5].Value = usu.Email1;
                    }

                    arParms[6] = new OracleParameter();
                    arParms[6].ParameterName = "P_NOVO_EMAIL2";
                    arParms[6].OracleDbType  = OracleDbType.Varchar2;
                    arParms[6].Direction     = ParameterDirection.Input;
                    if (usu.Email2.Length == 0)
                    {
                        arParms[6].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[6].Value = usu.Email2;
                    }

                    arParms[7] = new OracleParameter();
                    arParms[7].ParameterName = "P_NOVO_OBSERVACAO";
                    arParms[7].OracleDbType  = OracleDbType.Varchar2;
                    arParms[7].Direction     = ParameterDirection.Input;
                    if (usu.Observacao.Length == 0)
                    {
                        arParms[7].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[7].Value = usu.Observacao;
                    }

                    arParms[8] = new OracleParameter();
                    arParms[8].ParameterName = "P_FLAG_ATIVO";
                    arParms[8].OracleDbType  = OracleDbType.Char;
                    arParms[8].Direction     = ParameterDirection.Input;
                    if (usu.FlagAtivo.Length == 0)
                    {
                        arParms[8].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[8].Value = usu.FlagAtivo;
                    }

                    oConn.Execute("DNAINFO.P_U_USUARIO", arParms);

                    oConn.Commit();
                }
                catch (Exception ex)
                {
                    oConn.Rollback();
                    throw ex;
                }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void PesquisaSearchPF(Entidades.Cadastral.FiltroPesquisaSearchPF filtro, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[6];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "P_NOME";
                    arParms[0].OracleDbType  = OracleDbType.Varchar2;
                    arParms[0].Direction     = ParameterDirection.Input;
                    arParms[0].Value         = filtro.Nome;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_UF";
                    arParms[1].OracleDbType  = OracleDbType.Varchar2;
                    arParms[1].Direction     = ParameterDirection.Input;
                    if (filtro.UF.Trim().Equals(""))
                    {
                        arParms[1].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[1].Value = filtro.UF;
                    }

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_CIDADE";
                    arParms[2].OracleDbType  = OracleDbType.Varchar2;
                    arParms[2].Direction     = ParameterDirection.Input;
                    if (filtro.Cidade.Trim().Equals(""))
                    {
                        arParms[2].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[2].Value = filtro.Cidade;
                    }

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_DATA_NASCIMENTO";
                    arParms[3].OracleDbType  = OracleDbType.Varchar2;
                    arParms[3].Direction     = ParameterDirection.Input;
                    if (filtro.DataNascimento.Trim().Equals(""))
                    {
                        arParms[3].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[3].Value = filtro.DataNascimento;
                    }

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_NOME_MAE";
                    arParms[4].OracleDbType  = OracleDbType.Varchar2;
                    arParms[4].Direction     = ParameterDirection.Input;
                    if (filtro.NomeMae.Trim().Equals(""))
                    {
                        arParms[4].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[4].Value = filtro.NomeMae;
                    }

                    arParms[5] = new OracleParameter();
                    arParms[5].ParameterName = "R_CURSOR";
                    arParms[5].OracleDbType  = OracleDbType.RefCursor;
                    arParms[5].Direction     = ParameterDirection.Output;


                    oConn.Execute("DNAINFO.P_L_WS_RASTREAMENTO_SEARCH_PF", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void Cidades(int idUF, string UF, int idCidade, string NomeCidade, ref DataSet oDS)
        {
            try
            {
                ConexaoPersonalizada oConn = new ConexaoPersonalizada();

                try
                {
                    OracleParameter[] arParms = new OracleParameter[5];

                    arParms[0] = new OracleParameter();
                    arParms[0].ParameterName = "R_CURSOR";
                    arParms[0].OracleDbType  = OracleDbType.RefCursor;
                    arParms[0].Direction     = ParameterDirection.Output;

                    arParms[1] = new OracleParameter();
                    arParms[1].ParameterName = "P_UF";
                    arParms[1].OracleDbType  = OracleDbType.Varchar2;
                    arParms[1].Direction     = ParameterDirection.Input;
                    if (UF.Trim().Equals(""))
                    {
                        arParms[1].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[1].Value = UF;
                    }

                    arParms[2] = new OracleParameter();
                    arParms[2].ParameterName = "P_ID_UF";
                    arParms[2].OracleDbType  = OracleDbType.Int64;
                    arParms[2].Direction     = ParameterDirection.Input;
                    arParms[2].Value         = idUF;

                    arParms[3] = new OracleParameter();
                    arParms[3].ParameterName = "P_ID_CIDADE";
                    arParms[3].OracleDbType  = OracleDbType.Int64;
                    arParms[3].Direction     = ParameterDirection.Input;
                    arParms[3].Value         = idCidade;

                    arParms[4] = new OracleParameter();
                    arParms[4].ParameterName = "P_NOME_CIDADE";
                    arParms[4].OracleDbType  = OracleDbType.Varchar2;
                    arParms[4].Direction     = ParameterDirection.Input;
                    if (NomeCidade.Trim().Equals(""))
                    {
                        arParms[4].Value = DBNull.Value;
                    }
                    else
                    {
                        arParms[4].Value = NomeCidade;
                    }

                    oConn.Execute("DNAINFO.P_L_CIDADES", arParms, ref oDS);
                }
                catch (Exception ex)
                { throw ex; }
                finally
                {
                    oConn.CloseConnection();
                    oConn = null;
                }
            }
            catch (Exception ex)
            { throw ex; }
        }