Example #1
0
 public List<Fans_Follow_UserInfo> GetFans(int uid)
 {
     List<Fans_Follow_UserInfo> fans = new List<Fans_Follow_UserInfo>();
     SqlDataReader dr = SqlHelper.ExecuteReader("dbo.S_GetFans_By_Id", new SqlParameter("@id", uid));
     Fans_Follow_UserInfo user = null;
     while(dr.Read())
     {
         user = new Fans_Follow_UserInfo();
         user.UserName = dr.GetString(0);
         user.UserImage = dr.GetString(1);
         user.userid = dr.GetInt32(2);
         user.IsFollowed = isFollowed(uid, user.userid);
         fans.Add(user);
     }
     dr.Close();
     return fans;
 }
Example #2
0
 public List<Fans_Follow_UserInfo> Recommend(int uid)
 {
     List<Fans_Follow_UserInfo> users = new List<Fans_Follow_UserInfo>();
     Fans_Follow_UserInfo u = null;
     SqlDataReader dr = SqlHelper.ExecuteReader("S_Recommend",new SqlParameter("@uid",uid));
     while(dr.Read())
     {
         u = new Fans_Follow_UserInfo();
         u.userid = dr.GetInt32(0);
         u.UserName = dr.GetString(1);
         u.UserImage = dr.GetString(3);
         u.IsFollowed = isFollowed(uid, u.userid);
         users.Add(u);
     }
     dr.Close();
     return users;
 }