예제 #1
0
        public TestABC(string subThemeName)
        {
            QuestionDAL qDAL = new QuestionDAL();

            this._questionList  = qDAL.GetAllQuestionsBySubThemeName(subThemeName);
            this._testName      = subThemeName;
            this._questionCount = this._questionList.Count;
        }
예제 #2
0
        public void AddAnswer(string answer, string question, bool isRight)
        {
            int questionid = new int();

            QuestionDAL qDAL = new QuestionDAL();

            questionid = qDAL.GetQuestionIdByQuestionName(question);

            base.OpenConnection();

            SqlCommand command = new SqlCommand(string.Format("insert into Answers values('{0}','{1}','{2}')", answer, questionid, isRight), base._sqlConnection);

            SqlDataReader reader = command.ExecuteReader();

            base.OpenConnection();
        }