public string Excluir(TRegistro_LoteCustodia_X_Titulo val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(4); hs.Add("@P_ID_LOTE", val.Id_lote); hs.Add("@P_CD_EMPRESA", val.Cd_empresa); hs.Add("@P_NR_LANCTOCHEQUE", val.Nr_lanctocheque); hs.Add("@P_CD_BANCO", val.Cd_banco); return(this.executarProc("EXCLUI_FIN_TITULO_X_LOTECUSTODIA", hs)); }
public TList_LoteCustodia_X_Titulo Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { bool podeFecharBco = false; TList_LoteCustodia_X_Titulo lista = new TList_LoteCustodia_X_Titulo(); if (Banco_Dados == null) { this.CriarBanco_Dados(false); podeFecharBco = true; } System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo)); try { while (reader.Read()) { TRegistro_LoteCustodia_X_Titulo reg = new TRegistro_LoteCustodia_X_Titulo(); if (!(reader.IsDBNull(reader.GetOrdinal("ID_Lote")))) { reg.Id_lote = reader.GetDecimal(reader.GetOrdinal("ID_Lote")); } if (!reader.IsDBNull(reader.GetOrdinal("Cd_Empresa"))) { reg.Cd_empresa = reader.GetString(reader.GetOrdinal("CD_Empresa")); } if (!reader.IsDBNull(reader.GetOrdinal("CD_Banco"))) { reg.Cd_banco = reader.GetString(reader.GetOrdinal("CD_Banco")); } if (!reader.IsDBNull(reader.GetOrdinal("NR_LanctoCheque"))) { reg.Nr_lanctocheque = reader.GetDecimal(reader.GetOrdinal("NR_LanctoCheque")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }