public string Excluir(TRegistro_Questionario val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(1); hs.Add("@P_ID_QUESTIONARIO", val.Id_questionario); return(executarProc("EXCLUI_FAT_QUESTIONARIO", hs)); }
public string Gravar(TRegistro_Questionario val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(3); hs.Add("@P_ID_QUESTIONARIO", val.Id_questionario); hs.Add("@P_DS_QUESTIONARIO", val.Ds_questionario); hs.Add("@P_CANCELADO", val.Cancelado); return(executarProc("IA_FAT_QUESTIONARIO", hs)); }
public TList_Questionario Select(Utils.TpBusca[] vBusca, int vTop, string vNm_Campo) { TList_Questionario lista = new TList_Questionario(); System.Data.SqlClient.SqlDataReader reader = null; bool podeFecharBco = false; if (Banco_Dados == null) { podeFecharBco = CriarBanco_Dados(false); } try { reader = ExecutarBusca(SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNm_Campo)); while (reader.Read()) { TRegistro_Questionario reg = new TRegistro_Questionario(); if (!reader.IsDBNull(reader.GetOrdinal("id_questionario"))) { reg.Id_questionario = reader.GetDecimal(reader.GetOrdinal("id_questionario")); } if (!reader.IsDBNull(reader.GetOrdinal("ds_questionario"))) { reg.Ds_questionario = reader.GetString(reader.GetOrdinal("ds_questionario")); } if (!reader.IsDBNull(reader.GetOrdinal("cancelado"))) { reg.Cancelado = reader.GetBoolean(reader.GetOrdinal("cancelado")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { deletarBanco_Dados(); } } return(lista); }