예제 #1
0
        public static ImageInfoModel NewArtList(ArtInfoParams artInfoParams)
        {
            Tk_GalleryDetailBLL tk_GalleryDetailBLL = new Tk_GalleryDetailBLL();
            string json = artInfoParams.TryToJson();
            List <Tk_GalleryDetail> list = tk_GalleryDetailBLL.GetPageList(new Pagination()
            {
                page = 1, rows = 1, sidx = "PeriodsNumber", sord = "desc"
            }, json).ToList();
            ImageInfoModel rtdata = new ImageInfoModel();

            if (list.Count > 0)
            {
                rtdata = new ImageInfoModel()
                {
                    PeriodsNumber = list[0].PeriodsNumber
                };
            }
            // rtdata = rtdata.OrderBy(s => s.GalleryNumber).ToList();//升序排序
            return(rtdata);
        }
예제 #2
0
        /// <summary>
        /// 查询图谜实体
        /// </summary>
        /// <param name="artInfoParams"></param>
        /// <returns></returns>
        public static ImageInfoModel QueryArtInfo(ArtInfoParams artInfoParams)
        {
            Tk_GalleryDetailBLL tk_GalleryDetailBLL = new Tk_GalleryDetailBLL();
            string json = artInfoParams.TryToJson();
            List <Tk_GalleryDetail> list = tk_GalleryDetailBLL.GetPageList(new Pagination()
            {
                page = 1, rows = 1, sidx = "PeriodsNumber", sord = "desc"
            }, json).ToList();
            ImageInfoModel rtdata = new ImageInfoModel();

            if (list.Count > 0)
            {
                rtdata = new ImageInfoModel()
                {
                    galleryId     = list[0].GalleryId,
                    SortCode      = list[0].SortCode.Value,
                    ID            = list[0].ID,
                    ImageUrl      = list[0].ImageUrl,
                    PeriodsNumber = list[0].PeriodsNumber
                };
            }
            return(rtdata);
        }