コード例 #1
0
ファイル: ExamsSearch.cs プロジェクト: jonfee/Teamcores
 /// <summary>
 /// 初始化一个<see cref="ExamsSearch"/>对象实例
 /// </summary>
 /// <param name="request"></param>
 public ExamsSearch(ExamsSearchRequest request)
 {
     if (request != null)
     {
         CourseId  = request.CourseId;
         Keyword   = request.Keyword;
         Type      = request.Type;
         Status    = request.Status;
         PageIndex = request.PageIndex;
         PageSize  = request.PageSize;
     }
 }
コード例 #2
0
        public IActionResult Search(ExamsSearcherViewModel model)
        {
            ExamsSearchRequest request = new ExamsSearchRequest
            {
                CourseId  = model.CourseId,
                Keyword   = model.Keyword,
                PageIndex = model.PageIndex,
                PageSize  = model.PageSize,
                Type      = model.Type,
                Status    = model.Status
            };

            var result = service.Search(request);

            return(Ok(result));
        }
コード例 #3
0
ファイル: ExamsService.cs プロジェクト: jonfee/Teamcores
        /// <summary>
        /// 搜索考卷信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public PagerModel <Data.Entity.Exams> Search(ExamsSearchRequest request)
        {
            var searcher = new ExamsSearch(request);

            return(searcher.Search());
        }