Exemplo n.º 1
0
        /// <summary>
        /// 根据业务类型,学生主表ID获取对应笔记
        /// </summary>
        /// <param name="BusType">业务类型</param>
        /// <param name="StuID">学生ID</param>
        /// <returns></returns>
        public dynamic GetNoteList(W_CollectionModel model, string StuID, int System_Station_ID)
        {
            List <Question>       QuestionModel = SqlMapper.QueryForList <Question>("GetNoteListByStuID", new { QuestionStore_ID = model.QuestionStore_ID, QuestionType_ID = model.QuestionType_ID, StuID = StuID, System_Station_ID = System_Station_ID, pageIndex = (model.PageIndex - 1) * model.PageSize, pageSize = model.PageSize, pageStatus = model.PageStatus }).ToList();
            List <W_QuestionNote> NoteModel     = SqlMapper.QueryForList <W_QuestionNote>("GetQuestionListforNote", new { System_Station_ID = System_Station_ID, StuID = StuID }).ToList();

            if (QuestionModel == null)
            {
                throw new ApiException("无添加笔记,请添加后再试");
            }
            foreach (var item in QuestionModel)
            {
                item.NoteList = NoteModel.FindAll(x => x.Question_ID == item.ID);
            }
            return(QuestionModel);
        }
Exemplo n.º 2
0
 public dynamic GetNoteList([FromUri] W_CollectionModel model)
 {
     return(Success(mapper.GetNoteList(model, this.SafeGetStuId, this.System_Station_ID), model.PageIndex == 1 ? mapper.GetNoteListCount(model, this.SafeGetStuId, this.System_Station_ID) : 0));
 }
Exemplo n.º 3
0
 public IList GetStudentPraticeList(string StuId, W_CollectionModel page)
 {
     return(QueryForList("GetStudentPraticeList", new { StuId, StoreId = page.QuestionStore_ID, pageIndex = (page.PageIndex - 1) * page.PageSize, pageSize = page.PageSize, pageStatus = page.PageStatus }));
 }
Exemplo n.º 4
0
 public dynamic GetStudentPraticeList([FromUri] W_CollectionModel page)
 {
     return(Success(mapper.GetStudentPraticeList(this.SafeGetStuId, page), page.PageIndex == 1 ? mapper.GetStudentPraticeCount(this.SafeGetStuId, page.QuestionStore_ID) : 0));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 根据业务类型,学生主表ID获取对应笔记总条数
 /// </summary>
 /// <param name="BusType">业务类型</param>
 /// <param name="StuID">学生ID</param>
 /// <returns></returns>
 public int GetNoteListCount(W_CollectionModel model, string StuID, int System_Station_ID)
 {
     return(SqlMapper.QueryForObject <int>("GetNoteListByStuIDTotalCount", new { QuestionStore_ID = model.QuestionStore_ID, QuestionType_ID = model.QuestionType_ID, StuID = StuID, System_Station_ID = System_Station_ID, pageStatus = 0 }));
 }