public string Excluir(TRegistro_TpData val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(1); hs.Add("@P_ID_TPDATA", val.Id_TpData); return(this.executarProc("EXCLUI_FIN_TPDATA", hs)); }
public string Gravar(TRegistro_TpData val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(2); hs.Add("@P_ID_TPDATA", val.Id_TpData); hs.Add("@P_DS_TPDATA", val.Ds_tpData); return(this.executarProc("IA_FIN_TPDATA", hs)); }
public TList_TpData Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_TpData lista = new TList_TpData(); 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_TpData reg = new TRegistro_TpData(); if (!reader.IsDBNull(reader.GetOrdinal("ID_TpData"))) { reg.Id_TpData = reader.GetDecimal(reader.GetOrdinal("ID_TpData")); } if (!reader.IsDBNull(reader.GetOrdinal("DS_TpData"))) { reg.Ds_tpData = reader.GetString(reader.GetOrdinal("DS_TpData")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }