Exemple #1
0
 public TRegistro_CadEtapa()
 {
     this.id_etapa            = null;
     this.id_etapastr         = string.Empty;
     this.DS_Etapa            = string.Empty;
     this.Ordem               = decimal.Zero;
     this.ST_FecharPed        = string.Empty;
     this.ST_LiberarExped     = string.Empty;
     this.st_LiberarExpedbool = false;
     this.lprocesso           = new TList_ProcessoEtapa();
     this.St_processar        = false;
     this.stRegistro          = string.Empty;
     this.Login               = string.Empty;
 }
Exemple #2
0
        public TList_ProcessoEtapa Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            TList_ProcessoEtapa lista  = new TList_ProcessoEtapa();
            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));
                while (reader.Read())
                {
                    TRegistro_ProcessoEtapa reg = new TRegistro_ProcessoEtapa();
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Processo")))
                    {
                        reg.ID_Processo = reader.GetDecimal(reader.GetOrdinal("ID_Processo"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_Etapa")))
                    {
                        reg.Id_etapa = reader.GetDecimal(reader.GetOrdinal("ID_Etapa"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("DS_Processo")))
                    {
                        reg.DS_Processo = reader.GetString(reader.GetOrdinal("DS_Processo"));
                    }

                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }