示例#1
0
 public TargetDetail GetPhotoAssistionInfo(int pid, int type = -1)
 {
     TargetDetail detail = new TargetDetail();
     UsersExp exp = new UsersExp();
     Maticsoft.BLL.SNS.UserAlbums albums = new Maticsoft.BLL.SNS.UserAlbums();
     Maticsoft.BLL.SNS.UserAlbumDetail detail2 = new Maticsoft.BLL.SNS.UserAlbumDetail();
     detail.Photo = this.GetModel(pid);
     detail.UserModel = exp.GetUsersExpModel(detail.Userid);
     detail.UserAlums = albums.GetUserAlbum(0, detail.TargetId, detail.Userid);
     if (detail.UserAlums != null)
     {
         detail.CovorImageList = detail2.GetThumbImageByAlbum(detail.UserAlums.AlbumID, type);
     }
     return detail;
 }
示例#2
0
 public List<AlbumIndex> GetListByKeyWord(string KeyWord, string orderby, int startIndex, int endIndex, int type = -1)
 {
     DataSet set;
     List<AlbumIndex> list = new List<AlbumIndex>();
     string strWhere = "";
     if (!string.IsNullOrEmpty(KeyWord))
     {
         strWhere = "AlbumName like '%" + KeyWord + "%'";
     }
     string str2 = orderby;
     if (str2 != null)
     {
         if (!(str2 == "popular"))
         {
             if (str2 == "new")
             {
                 orderby = "CreatedDate";
                 goto Label_0079;
             }
             if (str2 == "hot")
             {
                 orderby = "CommentsCount";
                 goto Label_0079;
             }
         }
         else
         {
             orderby = "FavouriteCount";
             goto Label_0079;
         }
     }
     orderby = "FavouriteCount";
 Label_0079:
     set = this.dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
     List<Maticsoft.Model.SNS.UserAlbums> list2 = this.DataTableToList(set.Tables[0]);
     Maticsoft.BLL.SNS.UserAlbumDetail detail = new Maticsoft.BLL.SNS.UserAlbumDetail();
     foreach (Maticsoft.Model.SNS.UserAlbums albums in list2)
     {
         AlbumIndex item = new AlbumIndex(albums) {
             TopImages = detail.GetThumbImageByAlbum(albums.AlbumID, type)
         };
         list.Add(item);
     }
     return list;
 }
示例#3
0
 public List<AlbumIndex> GetUserFavAlbum(int UserId, int type = -1)
 {
     List<AlbumIndex> list = new List<AlbumIndex>();
     DataSet userFavAlbum = this.dal.GetUserFavAlbum(UserId);
     List<Maticsoft.Model.SNS.UserAlbums> list2 = this.DataTableToList(userFavAlbum.Tables[0]);
     Maticsoft.BLL.SNS.UserAlbumDetail detail = new Maticsoft.BLL.SNS.UserAlbumDetail();
     foreach (Maticsoft.Model.SNS.UserAlbums albums in list2)
     {
         AlbumIndex item = new AlbumIndex(albums) {
             TopImages = detail.GetThumbImageByAlbum(albums.AlbumID, type)
         };
         list.Add(item);
     }
     return list;
 }
示例#4
0
 public List<AlbumIndex> GetListForPageEx(int TypeID, string orderby, int startIndex, int endIndex, int type = -1)
 {
     List<AlbumIndex> list = new List<AlbumIndex>();
     DataSet set = this.dal.GetListForPageEx(TypeID, orderby, startIndex, endIndex);
     List<Maticsoft.Model.SNS.UserAlbums> list2 = this.DataTableToList(set.Tables[0]);
     Maticsoft.BLL.SNS.UserAlbumDetail detail = new Maticsoft.BLL.SNS.UserAlbumDetail();
     foreach (Maticsoft.Model.SNS.UserAlbums albums in list2)
     {
         AlbumIndex item = new AlbumIndex(albums) {
             TopImages = detail.GetThumbImageByAlbum(albums.AlbumID, type)
         };
         list.Add(item);
     }
     return list;
 }
示例#5
0
 public List<AlbumIndex> GetListForIndexEx(int TypeID, int type = -1)
 {
     List<AlbumIndex> list = new List<AlbumIndex>();
     DataSet set = this.dal.GetListForIndexEx(TypeID, 8, "FavouriteCount desc");
     List<Maticsoft.Model.SNS.UserAlbums> list2 = this.DataTableToList(set.Tables[0]);
     Maticsoft.BLL.SNS.UserAlbumDetail detail = new Maticsoft.BLL.SNS.UserAlbumDetail();
     foreach (Maticsoft.Model.SNS.UserAlbums albums in list2)
     {
         AlbumIndex item = new AlbumIndex(albums) {
             TopImages = detail.GetThumbImageByAlbum(albums.AlbumID, type)
         };
         list.Add(item);
     }
     return list;
 }
示例#6
0
 public List<AlbumIndex> GetListByUserId(int UserId, int type = -1)
 {
     List<AlbumIndex> list = new List<AlbumIndex>();
     List<Maticsoft.Model.SNS.UserAlbums> modelList = this.GetModelList("CreatedUserID=" + UserId);
     Maticsoft.BLL.SNS.UserAlbumDetail detail = new Maticsoft.BLL.SNS.UserAlbumDetail();
     foreach (Maticsoft.Model.SNS.UserAlbums albums in modelList)
     {
         AlbumIndex item = new AlbumIndex(albums) {
             TopImages = detail.GetThumbImageByAlbum(albums.AlbumID, type)
         };
         list.Add(item);
     }
     return list;
 }