I am trying to work with C# and i am stuck here. My problem is i want to retrieve the count of all the users in a specific side. Let me Explain. Here is my table snapshot with sample data.
Now what i want exactly is that i get the count of users in a specific side as i give a user id as a parameter.The data is stored in MS Sql Database and i have to implement this on a website so efficiency of code is also a issue.
Suppose i give 1001 as input
The output should be : Left:1 , Right: 8
if 1002 is input
The output should be : Left:5, Right:0
if 1003 is input
The output should be : Left:3, Right:0
if 1004 is input
The output should be : Left:0, Right:0
if 1005 is input
The output should be : Left:1, Right:1
and so on. So please provide me some logic on how to implement this thing.
I also want to get a code which would return an array of all child users of a particular ID in a hierarchical manner so that i could process that data with RadOrgChart Control.
Please help me.its very critical