/// <summary>
        /// 查询名家方案关系列表
        /// </summary>
        public List <ExperterQuerySchemeInfo> QueryExperterSchemeList(ExperterType experterType, string userId, string currentTime, int pageIndex, int pageSize, out int totalCount)
        {
            Session.Clear();
            pageIndex = pageIndex < 0 ? 0 : pageIndex;
            pageSize  = pageSize > BusinessHelper.MaxPageSize ? BusinessHelper.MaxPageSize : pageSize;

            var query = from r in this.Session.Query <ExperterScheme>()
                        where (r.ExperterType == experterType) &&
                        (currentTime == "" || r.CurrentTime == currentTime) &&
                        (userId == "" || r.UserId == userId)
                        orderby r.CreateTime descending
                        select new ExperterQuerySchemeInfo
            {
                Id                = r.Id,
                UserId            = r.UserId,
                Against           = r.Against,
                ExperterType      = r.ExperterType,
                GuestTeamComments = r.GuestTeamComments,
                HomeTeamComments  = r.HomeTeamComments,
                SchemeId          = r.SchemeId,
                Support           = r.Support,
                CurrentTime       = r.CurrentTime,
                CreateTime        = r.CreateTime,
                StopTime          = r.StopTime,
                BonusStatus       = r.BonusStatus,
            };

            totalCount = query.Count();
            return(query.Skip(pageIndex * pageSize).Take(pageSize).ToList());
        }
Beispiel #2
0
        /// <summary>
        /// 查询名家推荐方案列表
        /// </summary>
        public ExperterSchemeInfoCollection QueryExperterSchemeList(ExperterType experterType, string userId, string currentTime, int pageIndex, int pageSize)
        {
            var result     = new ExperterSchemeInfoCollection();
            var totalCount = 0;

            result.List.AddRange(new ExperterSchemeManager().QueryExperterSchemeList(experterType, userId, currentTime, pageIndex, pageSize, out totalCount));
            result.TotalCount = totalCount;
            return(result);
        }
 /// <summary>
 /// 查询名家推荐方案列表
 /// </summary>
 public ExperterSchemeInfoCollection QueryExperterSchemeList(ExperterType experterType, string userId, string currentTime, int pageIndex, int pageSize)
 {
     try
     {
         return(new ExpertBusiness().QueryExperterSchemeList(experterType, userId, currentTime, pageIndex, pageSize));
     }
     catch (Exception ex)
     {
         throw new Exception("查询名家推荐方案列表 - " + ex.Message);
     }
 }