コード例 #1
0
        protected override GetHomePageActivityListRD ProcessRequest(APIRequest <GetHomePageActivityListRP> pRequest)
        {
            var bll = new LEventsBLL(this.CurrentUserInfo);
            GetHomePageActivityListRD rd = new GetHomePageActivityListRD();

            if (pRequest.Parameters.PageIndex.HasValue == false)
            {
                pRequest.Parameters.PageIndex = 0;
            }
            if (pRequest.Parameters.PageSize.HasValue == false)
            {
                pRequest.Parameters.PageSize = 15;
            }
            var datas = bll.GetHomePageActivityList(pRequest.Parameters.PageIndex.Value, pRequest.Parameters.PageSize.Value);

            if (datas != null)
            {
                rd.Items = datas.Select(item => new ActivityListItemInfo()
                {
                    Title      = item.Title
                    , ImageUrl = item.ImageURL
                    , LinkUrl  = item.URL
                }).ToList();
            }
            //
            return(rd);
        }