I am trying to write a loop that will use the add.row function to add a number of rows that will be decided by user input. The button action submits info to a couple other tables also, and that function is working properly.
This code will execute, but instead of repeating until it is equal to purchaseCount it only records one entry just like it would if it was outside of the do, while phrase.
do
{
InventoryModuleDb3DataSet.BacksideLedgerRow newBacksideLedgerRow = inventoryModuleDb3DataSet.BacksideLedger.NewBacksideLedgerRow();
newBacksideLedgerRow.PurchaseDate = purchaseDate;
newBacksideLedgerRow.Type = purchaseType;
newBacksideLedgerRow.CostPerUnit = avgCost;
inventoryModuleDb3DataSet.BacksideLedger.Rows.Add(newBacksideLedgerRow);
purchaseCount++;
} while (purchaseCount > purchaseUnits);