public string Excluir(TRegistro_CadServico val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(1); hs.Add("@P_ID_SERVICO", val.Id_servico); return(this.executarProc("EXCLUI_MUD_SERVICOS", hs)); }
public string Gravar(TRegistro_CadServico val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(2); hs.Add("@P_ID_SERVICO", val.Id_servico); hs.Add("@P_DS_SERVICO", val.Ds_servico); return(this.executarProc("IA_MUD_SERVICOS", hs)); }
public TList_CadServico Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNm_Campo) { TList_CadServico lista = new TList_CadServico(); 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_CadServico reg = new TRegistro_CadServico(); if (!reader.IsDBNull(reader.GetOrdinal("ID_Servico"))) { reg.Id_servico = reader.GetDecimal(reader.GetOrdinal("ID_Servico")); } if (!reader.IsDBNull(reader.GetOrdinal("DS_Servico"))) { reg.Ds_servico = reader.GetString(reader.GetOrdinal("DS_Servico")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }