You can simply multiply all of them by -1 one by one.
And add btNodeID for each item in an array or list.
If a btNodeID already exists in list, find max value of list and make btNodeID = maxValue + 1.
Update:
If I understood question right:
Since you have a dataset, you can do something like following:
DataTable table = dataset.Tables[0];
List<int> list = new List<int>();
foreach (DataRow row in table.Rows)
{
int btNodeID = int.Parse(row[3].ToString()) * -1;
if (list.Count > 0 && list.Contains(btNodeID))
{
btNodeID = list.Max() + 1;
}
list.Add(btNodeID);
row[3] = btNodeID;
row.AcceptChanges();
}
table.AcceptChanges();
You probably need to add more control statements though.