示例#1
0
        public string Excluir(TRegistro_TpCreditoPisCofins val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(1);
            hs.Add("@P_ID_TPCRED", val.Id_tpcred);

            return(this.executarProc("EXCLUI_FIS_TPCREDITOPISCOFINS", hs));
        }
示例#2
0
        public TList_TpCreditoPisCofins Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNm_Campo)
        {
            TList_TpCreditoPisCofins lista = new TList_TpCreditoPisCofins();

            System.Data.SqlClient.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_TpCreditoPisCofins reg = new TRegistro_TpCreditoPisCofins();

                    if (!reader.IsDBNull(reader.GetOrdinal("id_tpcred")))
                    {
                        reg.Id_tpcred = reader.GetDecimal(reader.GetOrdinal("id_tpcred"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ds_tpcred")))
                    {
                        reg.Ds_tpcred = reader.GetString(reader.GetOrdinal("ds_tpcred"));
                    }

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