Exemplo n.º 1
0
        public TList_CTB_param_x_contaCTB Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo, string vOrderBy)
        {
            TList_CTB_param_x_contaCTB lista = new TList_CTB_param_x_contaCTB();
            SqlDataReader reader             = null;
            bool          podeFecharBco      = false;

            if (Banco_Dados == null)
            {
                podeFecharBco = this.CriarBanco_Dados(false);
            }

            try
            {
                reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo, vOrderBy));
                while (reader.Read())
                {
                    TRegistro_CTB_param_x_contaCTB reg = new TRegistro_CTB_param_x_contaCTB();

                    if (!reader.IsDBNull(reader.GetOrdinal("ID_DRE")))
                    {
                        reg.Id_dre = reader.GetDecimal(reader.GetOrdinal("ID_DRE"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("id_param")))
                    {
                        reg.Id_param = reader.GetDecimal(reader.GetOrdinal("id_param"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("cd_conta_ctb")))
                    {
                        reg.Cd_conta_CTB = reader.GetDecimal(reader.GetOrdinal("cd_conta_ctb"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ds_contactb")))
                    {
                        reg.DS_Conta = reader.GetString(reader.GetOrdinal("ds_contactb"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("cd_classificacao")))
                    {
                        reg.Cd_classificacao = reader.GetString(reader.GetOrdinal("cd_classificacao"));
                    }
                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }
Exemplo n.º 2
0
 public TRegistro_CTB_paramDRE()
 {
     this.id_param       = null;
     this.id_dre         = null;
     this.ds_param       = string.Empty;
     this.id_parampai    = null;
     this.id_parampaistr = string.Empty;
     this.Ds_parampai    = string.Empty;
     this.tp_conta       = string.Empty;
     this.tipo_conta     = string.Empty;
     this.Classificacao  = string.Empty;
     this.operador       = string.Empty;
     this.oper           = string.Empty;
     this.Nivel          = decimal.Zero;
     lparamConta         = new TList_CTB_param_x_contaCTB();
     lparamContaDel      = new TList_CTB_param_x_contaCTB();
 }