public string Excluir(TRegistro_CadTipoServico val) { Hashtable hs = new Hashtable(1); hs.Add("@P_ID_TPSERVICO", val.Id_tpservico); return(this.executarProc("EXCLUI_EST_TIPOSERVICO", hs)); }
public string Gravar(TRegistro_CadTipoServico val) { Hashtable hs = new Hashtable(3); hs.Add("@P_ID_TPSERVICO", val.Id_tpservico); hs.Add("@P_DS_TPSERVICO", val.Ds_tpservico); hs.Add("@P_PC_IBPT", val.PC_IBPT); return(this.executarProc("IA_EST_TIPOSERVICO", hs)); }
public TList_CadTipoServico Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_CadTipoServico lista = new TList_CadTipoServico(); 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_CadTipoServico reg = new TRegistro_CadTipoServico(); if (!reader.IsDBNull(reader.GetOrdinal("id_tpservico"))) { reg.Id_tpservico = reader.GetString(reader.GetOrdinal("id_tpservico")); } if (!reader.IsDBNull(reader.GetOrdinal("ds_tpservico"))) { reg.Ds_tpservico = reader.GetString(reader.GetOrdinal("ds_tpservico")); } if (!reader.IsDBNull(reader.GetOrdinal("PC_IBPT"))) { reg.PC_IBPT = reader.GetDecimal(reader.GetOrdinal("PC_IBPT")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }