public void PopGrid() { int num = User.UserId; this.GridViewFrends.DataSource = UserCommand.PopFriends(num); GridViewFrends.DataBind(); }
public void PopGrid(int id) { GroupServies Gr = new GroupServies(); Ds = Gr.GetPoepleInGroupDb(id); int num = ((UserDetail)Session["User"]).UserId; UserServies UserCommand = new UserServies(); DataSet DsFirends = new DataSet(); DsFirends = UserCommand.PopFriends(num); for (int d = 0; d < Ds.Tables[0].Rows.Count; d++) { for (int i = 0; i < DsFirends.Tables[0].Rows.Count; i++) { if (Ds.Tables[0].Rows[d]["UserId"].ToString() == DsFirends.Tables[0].Rows[i]["FriendId"].ToString()) { DsFirends.Tables[0].Rows.RemoveAt(i); } } } this.GridViewFrends.DataSource = DsFirends; GridViewFrends.DataBind(); }