Ejemplo n.º 1
0
 public AlbumModel GetAlbum(blog_varticle varticle)
 {
     var album = new AlbumModel();
     if (varticle != null)
     {
         album.Varticle = varticle;
         AlbumPhotoModel cover;
         album.ImageList = GetAlbumPhotoList(varticle.content, out cover);
         album.Cover = cover;
         album.ImgCount = album.ImageList.Count();
         album.Category = GetCategoryById(varticle.cateid);
     }
     return album;
 }
Ejemplo n.º 2
0
 private AlbumViewModel ConvertToAlbumViewModel(AlbumModel album)
 {
     return new AlbumViewModel
     {
         WebTitle = WebUtils.MyString(album.Varticle.seotitle, album.Varticle.title),
         WebPath = MyService.GetCategoryPathUrl(album.Varticle.catepath),
         Seo = WebUtils.GetSeoInfo(album.Varticle),
         ArticleInfo = album.Varticle,
         AlbumPath = MyService.GetCategoryPathUrl2(album.Varticle.catepath),
         PhotoList = album.ImageList,
         ImgCount = album.ImgCount,
         Cover = album.Cover,
         Category = MyService.GetCategoryById(album.Varticle.cateid)
     };
 }