public override ExercicioViewModel Consulta(int id) { var p = new SqlParameter[] { new SqlParameter("id", id) }; var tabela = HelperDAO.ExecutaProcSelect("spConsultaExercicio", p); if (tabela.Rows.Count == 0) { return(null); } else { return(MontaModel(tabela.Rows[0])); } }
public LoginViewModel Consulta(int id, string senha, char tipo) { var p = new SqlParameter[] { new SqlParameter("Id", id), new SqlParameter("tabela", Tabela) }; var sql = "select * from fnc_ConsultaLogin(" + id + ",'" + senha + "','" + tipo + "')"; var tabela = HelperDAO.ExecutaSelect(sql, null); if (tabela.Rows.Count == 0) { return(null); } else { return(MontaModel(tabela.Rows[0])); } }