mairtin

mairtin

  • NA
  • 6
  • 0

Newbie needs help - calculating numbers

Apr 11 2006 6:34 AM
Hi guys, im new to c# and asp.net so i need some help

I have a list of values read in with an SqlDataReader.
There are a list of Candidate numbers and the votes given to them.
This is how it would look on the screen(except there are 29 votes cast by )
The colors consititute different votes i.e the votes in red are cast by one person,the votes in blue another person etc.

 id    Cand.No   Vote
 1     1             1
 2     2             4
 3     3             5
 4     4             2
 5     5             3
 6     1             1
 7     1             1 
 8     1             2
 9     2             1
 .      .              .
 .      .              .
29     2             1

Anyways, here is my problem. I Want to know how you would check to the data and get all the number 1 votes for all the candidates i.e get all the number 1 votes for Cand.No 1, Cand.No 2 etc.
I am really  in need of any help i can get, my attempts have failed miserably(used ArrayLists and stuff to do it but no look)

Cheers