Example #1
0
        internal LsUf Listar()
        {
            try
            {
                var m_oUf = new LsUf();
                sbSQL.Length = 0;
                sbSQL.Append("SELECT CDUNDDFEDR, IDPRO021, NMUNDDFEDR");
                sbSQL.Append(" FROM TBPRO021");

                oAdapter = ObterDataAdapter(sbSQL.ToString());

                ITableMapping objMapping = oAdapter.TableMappings.Add("Table", LsUf.tbUf);
                objMapping.ColumnMappings.Add("CDUNDDFEDR", LsUf.cpSigla);
                objMapping.ColumnMappings.Add("IDPRO021", LsUf.cpCodigo);
                objMapping.ColumnMappings.Add("NMUNDDFEDR", LsUf.cpNome);

                oAdapter.Fill(m_oUf);

                return m_oUf;
            }
            catch (Exception ex)
            {
                throw new Dor.Util.OperacaoInvalidaBD(ex);
            }
        }
Example #2
0
        public System.Data.DataSet Listar(string v_sExpressao)
        {
            LsUf m_oLsUf = new LsUf();

            repositorio.Conectar();
            m_oLsUf = this.repositorio.Listar(v_sExpressao);
            repositorio.Desconectar();

            return m_oLsUf;
        }
Example #3
0
        public override System.Data.DataSet Listar()
        {
            LsUf m_oLsUf = new LsUf();

            repositorio.Conectar();

            if (UtSessao.Sessao["expressao"].ToString() == "")
            {
                m_oLsUf = this.repositorio.Listar();
            }
            else
            {
                m_oLsUf = this.repositorio.Listar(UtSessao.Sessao["expressao"].ToString());
            }

            repositorio.Desconectar();

            return m_oLsUf;
        }