/// <summary> /// 添加练习记录 /// </summary> /// <param name="acid">学员id</param> /// <param name="couid">课程id</param> /// <param name="olid">章节id</param> /// <param name="ques">试题id</param> /// <param name="index">试题页面中的索引</param> /// <returns></returns> public LogForStudentQuestions QuestionAdd(int acid, int couid, int olid, int ques, int index) { LogForStudentQuestions entity = new LogForStudentQuestions(); entity.Ac_ID = acid; entity.Cou_ID = couid; entity.Ol_ID = olid; entity.Qus_ID = ques; entity.Lsq_Index = index; entity.Lsq_CrtTime = DateTime.Now; entity.Lsq_LastTime = entity.Lsq_CrtTime; Gateway.Default.Save <LogForStudentQuestions>(entity); return(entity); }
/// <summary> /// 修改练习记录 /// </summary> /// <param name="acid">学员id</param> /// <param name="couid">课程id</param> /// <param name="olid">章节id</param> /// <param name="ques">试题id</param> /// <param name="index">试题页面中的索引</param> /// <returns></returns> public LogForStudentQuestions QuestionUpdate(int acid, int couid, int olid, int ques, int index) { LogForStudentQuestions entity = this.QuestionSingle(acid, couid, 0); if (entity == null) { entity = this.QuestionAdd(acid, couid, 0, ques, index); } entity.Qus_ID = ques; entity.Lsq_Index = index; entity.Lsq_LastTime = DateTime.Now; entity.Ol_ID = olid; Gateway.Default.Save <LogForStudentQuestions>(entity); return(entity); }