Пример #1
0
        public void TestQueryHaveAnsweredQuestionNumber()
        {
            userId = Convert.ToInt32(userAdapter.InsertUser("test", "123", "ceshiyuan", "male", "158", "*****@*****.**", null));

            int answerId = questionManager.InsertUserAnswer(userId, examId, questionId, "A");
            int count    = questionManager.QueryHaveAnsweredQuestionNumber(userId, examId);

            Assert.AreEqual(1, count);

            userAdapter.DeleteUserById(userId);
            answerAdapter.DeleteUserAnswer(answerId);
        }
Пример #2
0
 protected void rep_userlist_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Equals("delete"))
     {
         UserTableAdapter ta_user = new UserTableAdapter();
         ta_user.DeleteUserById(Convert.ToInt32(e.CommandArgument));
         ValueInit();
     }
     if (e.CommandName.Equals("update"))
     {
         Response.Redirect("user_alterpassword.aspx?id=" + e.CommandArgument);
     }
 }
Пример #3
0
 public void TearDown()
 {
     adapter.DeleteUserById(id);
 }
Пример #4
0
 public void TearDown()
 {
     userAdapter.DeleteUserById(userId);
     examAdapter.DeleteExamById(examId);
     UEAdapter.DeleteExamResult(ueId);
 }