Exemple #1
0
        public TList_param_x_Historico Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo, string vOrderBy)
        {
            TList_param_x_Historico lista  = new TList_param_x_Historico();
            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_param_x_Historico reg = new TRegistro_param_x_Historico();

                    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_historico")))
                    {
                        reg.Cd_historico = reader.GetString(reader.GetOrdinal("Cd_historico"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Ds_historico")))
                    {
                        reg.Ds_historico = reader.GetString(reader.GetOrdinal("Ds_historico"));
                    }
                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }
Exemple #2
0
 public TRegistro_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_param_x_Historico();
     lparamContaDel      = new TList_param_x_Historico();
 }