Need an efficient way for a simple problem in c#
<p>I am developing a web application using c#. I am reading some data from database to a data table named dt . Sample data is shown below.</p>

<pre><code>agentName  WeekNumber Score 
John       3          45
John       5          78
John       6          33
</code></pre>

<p>I want to make some change in the above data based on some conditions. Cause i want to draw a graph based on this data.The agent name is always same.and the week field is unique. I want to make a new data table using conditions listed below.</p>

<p>1-The new data table week field must start from 1.If there is no entry in the data table for week 1, you can add the data into new data table as shown below </p>

<pre><code>John 1  0
</code></pre>

<p>it means just give 0  as score.</p>

<p>2-If there is any missing weeks from second row onwards in the data table obtained from database , add the row for that week with score as -1.
in the above example after first row there is a missing week 4. so add it to new data table with score -1</p>

<p>the new data tab;e for sample data is shon below</p>

<pre><code>agentName WeekNumber Score
John      1          0
John      2          0
John      3          45
John      4         -1
John      5         78
John      6         33
</code></pre>

<p>How can i do it in an efficient method using c#? The number of rows will vary .
I want to do it using c# . not by using queries because of some reason</p>
