Exemple #1
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;
 }
Exemple #2
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;
 }
Exemple #3
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;
 }
Exemple #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;
 }
Exemple #5
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;
 }