public btCHSTRAS_091_Unit(DateTime startTime, int totalNum, btSHFUserLogin shfUserLogin, btSHFUnitPractice shfUnitPratice) { bt = new btCHSTRAS_091_Base(); time = new btCHSTRAS_091_Time(); userUnitIDs = bt.getUserUnitIDs(shfUserLogin, shfUnitPratice); answerTime = time.getAnswerTime(startTime); this.startTime = startTime; this.totalNum = totalNum; }
public void record(int questionID, DateTime startTime, String testAnswer, bool testRight, int testScore) { btCHSTRAS_091_Time time = new btCHSTRAS_091_Time(); Hashtable keyValues = new Hashtable(); foreach (DictionaryEntry userUnitID in userUnitIDs) { keyValues.Add(userUnitID.Key, userUnitID.Value); } keyValues.Add("QuestionID", questionID); keyValues.Add("StartDateTime", startTime); keyValues.Add("AnswerTime", time.getAnswerTime(startTime)); keyValues.Add("TestAnswer", testAnswer); keyValues.Add("TestRight", testRight); keyValues.Add("TestScore", testScore); database.insert("R_SHFItemScores", keyValues); }