Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. +-------+-------+
  2. | host | count |
  3. +-------+-------+
  4. | comp1 | 2 |
  5. +-------+-------+
  6. | comp2 | 3 |
  7. +-------+-------+
  8. | comp3 | 2 |
  9. +-------+-------+
  10.  
  11. +----+-------+
  12. | id | host |
  13. +----+-------+
  14. | 1 | comp1 |
  15. +----+-------+
  16. | 2 | comp2 |
  17. +----+-------+
  18. | 3 | comp1 |
  19. +----+-------+
  20. | 4 | comp3 |
  21. +----+-------+
  22. | 5 | comp1 |
  23. +----+-------+
  24. | 6 | comp3 |
  25. +----+-------+
  26.  
  27. for (int i = 0; i < distinct.Rows.Count; i++)
  28. {
  29. if (Convert.ToInt32(distinct.Rows[i][1]) < 3)
  30. {
  31. foreach (DataRow row in t.Select())
  32. {
  33. if (row[1].ToString() == distinct.Rows[i][0].ToString())
  34. {
  35. row.Delete();
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement