public string Excluir(TRegistro_Rodado val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(1); hs.Add("@P_ID_RODADO", val.Id_rodado); return(this.executarProc("EXCLUI_FRT_RODADO", hs)); }
public string Gravar(TRegistro_Rodado val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(2); hs.Add("@P_ID_RODADO", val.Id_rodado); hs.Add("@P_DS_RODADO", val.Ds_rodado); return(this.executarProc("IA_FRT_RODADO", hs)); }
public TList_Rodado SelectRodadoComVeiculo(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_Rodado lista = new TList_Rodado(); System.Data.SqlClient.SqlDataReader reader = null; bool podeFecharBco = false; if (Banco_Dados == null) { podeFecharBco = this.CriarBanco_Dados(false); } try { reader = this.ExecutarBusca(this.SqlCodeBuscaRodadoComVeiculo(vBusca, Convert.ToInt16(vTop), vNM_Campo)); while (reader.Read()) { TRegistro_Rodado reg = new TRegistro_Rodado(); if (!reader.IsDBNull(reader.GetOrdinal("Id_rodado"))) { reg.Id_rodado = reader.GetDecimal(reader.GetOrdinal("Id_rodado")); } if (!reader.IsDBNull(reader.GetOrdinal("Ds_rodado"))) { reg.Ds_rodado = reader.GetString(reader.GetOrdinal("Ds_rodado")); } if (!reader.IsDBNull(reader.GetOrdinal("Id_veiculo"))) { reg.Id_veiculo = reader.GetDecimal(reader.GetOrdinal("Id_veiculo")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }