Example #1
0
        public dynamic GetQuestionStoreList([FromUri] QuestionStoreRequest request)
        {
            if (!string.IsNullOrEmpty(request.Name))
            {
                request.Name = request.Name.Trim();
            }
            var dict = mapper.GetQuestionStoreList(request, this.System_Station_ID);

            return(Success(dict, request.PageIndex == 1 ? mapper.GetTotalCount(request, this.System_Station_ID) : 0));
        }
Example #2
0
 /// <summary>
 /// 获取题库列表总条数
 /// </summary>
 /// <param name="request"></param>
 /// <param name="stationId"></param>
 /// <returns></returns>
 public int GetTotalCount(QuestionStoreRequest request, int stationId)
 {
     return(SqlMapper.QueryForObject <int>("GetQuestionStoreCount", new { name = request.Name, valid = request.Valid, disciplineId = request.DisciplineId, stationId, pageStatus = 0 }));
 }
Example #3
0
 /// <summary>
 /// 获取题库列表
 /// </summary>
 /// <param name="name"></param>
 /// <param name="valid"></param>
 /// <param name="disciplineId"></param>
 /// <returns></returns>
 public IList GetQuestionStoreList(QuestionStoreRequest request, int stationId)
 {
     return(QueryForList("GetQuestionStoreList", new { name = request.Name, valid = request.Valid, disciplineId = request.DisciplineId, stationId, pageIndex = (request.PageIndex - 1) * request.PageSize, pageSize = request.PageSize, pageStatus = request.PageStatus }));
 }