Ejemplo n.º 1
0
 public List<Maticsoft.ViewModel.SNS.StarRank> HotStarList(int top = 4)
 {
     List<Maticsoft.ViewModel.SNS.StarRank> list = new List<Maticsoft.ViewModel.SNS.StarRank>();
     DataSet set = this.dal.GetList(top, " IsRecommend='true'", " Sequence");
     List<Maticsoft.Model.SNS.StarRank> list2 = this.DataTableToList(set.Tables[0]);
     UsersExp exp = new UsersExp();
     foreach (Maticsoft.Model.SNS.StarRank rank2 in list2)
     {
         Maticsoft.ViewModel.SNS.StarRank item = new Maticsoft.ViewModel.SNS.StarRank(rank2);
         UsersExpModel usersExpModel = exp.GetUsersExpModel(rank2.UserId);
         if (usersExpModel != null)
         {
             item.FansCount = usersExpModel.FansCount.Value;
             item.FavouritesCount = usersExpModel.FavoritedCount.Value;
             item.ProductsCount = usersExpModel.ProductsCount.Value;
             item.Singature = usersExpModel.Singature;
             item.IsFellow = usersExpModel.IsFellow;
         }
         list.Add(item);
     }
     return list;
 }
Ejemplo n.º 2
0
 public List<Maticsoft.ViewModel.SNS.StarRank> GetStarRankList(int StarType, int top = 10)
 {
     List<Maticsoft.ViewModel.SNS.StarRank> list = new List<Maticsoft.ViewModel.SNS.StarRank>();
     DataSet set = new DataSet();
     if (StarType == 0)
     {
         set = this.dal.GetList(top, " RankType=0 and  Status=1", " Sequence");
     }
     else
     {
         set = this.dal.GetList(top, "  RankType=0 and  Status=1 and TypeID=" + StarType, " Sequence");
     }
     List<Maticsoft.Model.SNS.StarRank> list2 = this.DataTableToList(set.Tables[0]);
     UsersExp exp = new UsersExp();
     foreach (Maticsoft.Model.SNS.StarRank rank2 in list2)
     {
         Maticsoft.ViewModel.SNS.StarRank item = new Maticsoft.ViewModel.SNS.StarRank(rank2);
         UsersExpModel usersExpModel = exp.GetUsersExpModel(rank2.UserId);
         if (usersExpModel != null)
         {
             item.FansCount = usersExpModel.FansCount.Value;
             item.FavouritesCount = usersExpModel.FavoritedCount.Value;
             item.ProductsCount = usersExpModel.ProductsCount.Value;
             item.Singature = usersExpModel.Singature;
             item.IsFellow = usersExpModel.IsFellow;
         }
         list.Add(item);
     }
     return list;
 }