public string DeletarCTRDuplicata(TRegistro_CTRDuplicata val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(3); hs.Add("@P_CD_EMPRESA", val.Cd_empresa); hs.Add("@P_NR_LANCTOCTR", val.Nr_lanctoctr); hs.Add("@P_NR_LANCTODUPLICATA", val.Nr_lanctoduplicata); return(this.executarProc("EXCLUI_CTR_DUPLICATA", hs)); }
public TList_CTRDuplicata Select(TpBusca[] vBusca, short vTop, string vNM_Campo) { bool st_transacao = false; if (this.Banco_Dados == null) { this.CriarBanco_Dados(true); } TList_CTRDuplicata lista = new TList_CTRDuplicata(); System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo)); try { while (reader.Read()) { TRegistro_CTRDuplicata reg = new TRegistro_CTRDuplicata(); if (!reader.IsDBNull(reader.GetOrdinal("cd_empresa"))) { reg.Cd_empresa = reader.GetString(reader.GetOrdinal("cd_empresa")); } if (!reader.IsDBNull(reader.GetOrdinal("nr_lanctoctr"))) { reg.Nr_lanctoctr = reader.GetDecimal(reader.GetOrdinal("nr_lanctoctr")); } if (!reader.IsDBNull(reader.GetOrdinal("nr_lanctoduplicata"))) { reg.Nr_lanctoduplicata = reader.GetDecimal(reader.GetOrdinal("nr_lanctoduplicata")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (st_transacao) { this.deletarBanco_Dados(); } } return(lista); }