Beispiel #1
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <UserInfo> GetHairStylistByStoreId(string customerId, string unitId, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <UserInfo> eventsList = new List <UserInfo>();
            DataSet          ds         = new DataSet();

            ds = _currentDAO.GetHairStylistByStoreId(customerId, unitId, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <UserInfo>(ds.Tables[0]);

                //if (eventsList != null)
                //{
                //    foreach (var item in eventsList)
                //    {
                //        item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                //        {
                //            ObjectId = item.VipShowId
                //        }, null);
                //    }
                //}
            }
            return(eventsList);
        }
Beispiel #2
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <ItemKeepEntity> GetList(ItemKeepEntity entity, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <ItemKeepEntity> eventsList = new List <ItemKeepEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetList(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <ItemKeepEntity>(ds.Tables[0]);

                if (eventsList != null)
                {
                    foreach (var item in eventsList)
                    {
                        item.ItemDetail = itemService.GetVwItemDetailById(item.ItemId, entity.VipId);
                    }
                }
            }
            return(eventsList);
        }
Beispiel #3
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <MVipShowEntity> GetList(MVipShowEntity entity, int Page, int PageSize)
        {
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);
            var itemService     = new ItemService(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <MVipShowEntity> eventsList = new List <MVipShowEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetList(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <MVipShowEntity>(ds.Tables[0]);

                if (eventsList != null)
                {
                    foreach (var item in eventsList)
                    {
                        item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                        {
                            ObjectId = item.VipShowId
                        }, new OrderBy[] { new  OrderBy {
                                               FieldName = "CreateTime", Direction = OrderByDirections.Desc
                                           } });
                    }
                }
            }
            return(eventsList);
        }
Beispiel #4
0
        /// <summary>
        /// 列表获取
        /// </summary>
        public IList <ZCourseEntity> GetCourses(ZCourseEntity entity, int Page, int PageSize)
        {
            var zCourseReflectionsBLL = new ZCourseReflectionsBLL(CurrentUserInfo);
            var zCourseNewsMappingBLL = new ZCourseNewsMappingBLL(CurrentUserInfo);
            var lNewsBLL        = new LNewsBLL(CurrentUserInfo);
            var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo);

            if (PageSize <= 0)
            {
                PageSize = 15;
            }

            IList <ZCourseEntity> eventsList = new List <ZCourseEntity>();
            DataSet ds = new DataSet();

            ds = _currentDAO.GetCourses(entity, Page, PageSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                eventsList = DataTableToObject.ConvertToList <ZCourseEntity>(ds.Tables[0]);

                if (eventsList != null)
                {
                    foreach (var item in eventsList)
                    {
                        item.CourseReflectionsList = zCourseReflectionsBLL.GetList(new ZCourseReflectionsEntity()
                        {
                            CourseId = item.CourseId
                        }, 0, 10000);
                        var mapList = zCourseNewsMappingBLL.QueryByEntity(new ZCourseNewsMappingEntity()
                        {
                            CourseId = item.CourseId
                        }, null);
                        if (mapList != null)
                        {
                            item.NewsList = new List <LNewsEntity>();
                            foreach (var mapItem in mapList)
                            {
                                var newsObj = lNewsBLL.GetByID(mapItem.NewsId);
                                if (newsObj == null)
                                {
                                    continue;
                                }
                                item.NewsList.Add(new LNewsEntity()
                                {
                                    NewsId       = newsObj.NewsId,
                                    NewsTitle    = newsObj.NewsTitle,
                                    PublishTime  = newsObj.PublishTime,
                                    displayIndex = newsObj.displayIndex,
                                });
                            }
                        }
                        item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity()
                        {
                            ObjectId = item.CourseId
                        }, null).ToList();
                        if (item.ImageList.Count > 0)
                        {
                            item.ImageUrl = item.ImageList[0].ImageURL;
                        }
                    }
                }
            }
            return(eventsList);
        }