Example #1
0
        /// <summary>
        /// 获取租户下的试卷分类列表
        /// </summary>
        /// <param name="TenantId">租户ID</param>
        /// <returns></returns>
        public List <tbExampaperSort> GetAllExampaperSortList(int TenantId)
        {
            var querylist = new List <IMongoQuery>();

            querylist.Add(Query.EQ("Status", 0));
            querylist.Add(Query.EQ("TenantId", TenantId));
            IMongoQuery query = Query.And(querylist);

            return(eDB.GetAllList <tbExampaperSort>(query));
        }
Example #2
0
        /// <summary>
        /// 获取试卷列表
        /// </summary>
        /// <param name="totalcount">总数</param>
        /// <param name="sortID">试卷库ID</param>
        /// <param name="TenantId">租户ID</param>
        /// <param name="title">试卷名称</param>
        /// <param name="createStart">创建时间-开始</param>
        /// <param name="createEnd">创建时间-结束</param>
        /// <param name="lastStart">最后修改时间-开始</param>
        /// <param name="lastEnd">最后修改时间-结束</param>
        /// <param name="open">是否公开</param>
        /// <param name="available">是否禁用</param>
        /// <param name="userIds">用户ID</param>
        /// <param name="pageSize">数量</param>
        /// <param name="pageIndex">页码</param>
        /// <returns></returns>
        public List <tbExampaper> GetAllExampaperList(ref int totalcount, int sortID, int TenantId, string title, DateTime?createStart, DateTime?createEnd, DateTime?lastStart, DateTime?lastEnd, int open = 99, int available = 99, int[] userIds = null, int pageSize = int.MaxValue, int pageIndex = 0)
        {
            var sotrlist = new List <int>();

            if (sortID != 0)
            {
                sotrlist.Add(sortID);
                var querylist = new List <IMongoQuery>();
                querylist.Add(Query.EQ("Status", 0));
                querylist.Add(Query.EQ("TenantId", TenantId));
                IMongoQuery            query = Query.And(querylist);
                List <tbExampaperSort> list  = ESDB.GetAllList <tbExampaperSort>(query);
                GetSortByFatherID(list, sortID, ref sotrlist);
            }
            return(EDB.GetAllExampaperList(ref totalcount, sotrlist, TenantId, title, createStart, createEnd, lastStart, lastEnd, open, available, userIds, pageSize, pageIndex));
        }
Example #3
0
 /// <summary>
 ///     获取问题分类列表
 /// </summary>
 /// <returns></returns>
 public List <tbExampaperSort> GetAllExampaperSortList()
 {
     return(eDB.GetAllList <tbExampaperSort>(false));
 }