Ejemplo n.º 1
0
        public string Deleta(TRegistro_CadGrupoPatrimonio vRegistro)
        {
            Hashtable hs = new Hashtable(1);

            hs.Add("@P_ID_GRUPOPATRIM", vRegistro.ID_GrupoPatrim);
            return(this.executarProc("EXCLUI_CTB_GRUPOPATRIM", hs));
        }
Ejemplo n.º 2
0
        public string Grava(TRegistro_CadGrupoPatrimonio vRegistro)
        {
            Hashtable hs = new Hashtable(2);

            hs.Add("@P_ID_GRUPOPATRIM", vRegistro.ID_GrupoPatrim);
            hs.Add("@P_DS_GRUPOPATRIM", vRegistro.DS_GrupoPatrim);

            return(this.executarProc("IA_CTB_GRUPOPATRIMONIO", hs));
        }
Ejemplo n.º 3
0
        public TList_CadGrupoPatrimonio Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            TList_CadGrupoPatrimonio lista  = new TList_CadGrupoPatrimonio();
            SqlDataReader            reader = null;
            bool podeFecharBco = false;

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

            try
            {
                reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo));
                while (reader.Read())
                {
                    TRegistro_CadGrupoPatrimonio reg = new TRegistro_CadGrupoPatrimonio();
                    if (!reader.IsDBNull(reader.GetOrdinal("ID_GrupoPatrim")))
                    {
                        reg.ID_GrupoPatrim = reader.GetDecimal(reader.GetOrdinal("ID_GrupoPatrim"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("DS_GrupoPatrim")))
                    {
                        reg.DS_GrupoPatrim = reader.GetString(reader.GetOrdinal("DS_GrupoPatrim"));
                    }

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