public string Excluir(TRegistro_CentroResult_X_Historico val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(2); hs.Add("@P_CD_CENTRORESULT", val.Cd_centroresult); hs.Add("@P_CD_HISTORICO", val.Cd_historico); return(executarProc("EXCLUI_FIN_CENTRORESULT_X_HISTORICO", hs)); }
public TList_CentroResult_X_Historico Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_CentroResult_X_Historico lista = new TList_CentroResult_X_Historico(); bool podeFecharBco = false; if (Banco_Dados == null) { podeFecharBco = CriarBanco_Dados(false); } System.Data.SqlClient.SqlDataReader reader = ExecutarBusca(SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo)); try { while (reader.Read()) { TRegistro_CentroResult_X_Historico reg = new TRegistro_CentroResult_X_Historico(); if (!(reader.IsDBNull(reader.GetOrdinal("CD_CentroResult")))) { reg.Cd_centroresult = reader.GetString(reader.GetOrdinal("CD_CentroResult")); } if (!(reader.IsDBNull(reader.GetOrdinal("Cd_historico")))) { reg.Cd_historico = reader.GetString(reader.GetOrdinal("Cd_historico")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { deletarBanco_Dados(); } } return(lista); }