Fixed more bugs with the parsing engine, a crash bug in the update inventory method, and a crash bug in the trimming operations. Deleting a row now marks all rows under it as dirty.

This commit is contained in:
2017-01-21 01:39:28 -06:00
parent ab00ad2598
commit 12239bce23
7 changed files with 172 additions and 21 deletions
+11
View File
@@ -683,12 +683,23 @@ namespace AdvertsingProfitControl
//Reset the gAdSpecialIndex to -1.
_adSpecialIndex = -1;
e.Cancel = true; //Prevent the new row from being removed.
return;
}
else
{
e.Cancel = true;
}
}
//Mark all rows under the row that just got deleted as dirty.
for (var index = currentRowIndex; currentRowIndex < dataGridView.Rows.Count; index++)
{
projectionsDataGridView.Rows[index].Cells[(int)SalesTableColumns.IsDirty].Value = true;
projectionsDataGridView.Rows[index].HeaderCell.Style.BackColor = ApplicationColors.PendingEdit;
inventoryDataGridView.Rows[index].Cells[(int)InventoryTableColumns.IsDirty].Value = true;
inventoryDataGridView.Rows[index].HeaderCell.Style.BackColor = ApplicationColors.PendingEdit;
actualSalesDataGridView.Rows[index].Cells[(int)SalesTableColumns.IsDirty].Value = true;
actualSalesDataGridView.Rows[index].HeaderCell.Style.BackColor = ApplicationColors.PendingEdit;
}
}
private void ChangeAutoCompleteListOnKeyCombo(object sender, KeyEventArgs e)