Fixed a bug in the row parsing engine related to ad special rows. Move all data from the old format to the new format. Updated the main form's UI.
This commit is contained in:
@@ -32,12 +32,6 @@ namespace AdvertsingProfitControl
|
||||
isMemberColumn = (int)InventoryTableColumns.IsMemberRow;
|
||||
isDirtyColumn = (int) InventoryTableColumns.IsDirty;
|
||||
}
|
||||
//If the current row is an Ad Special Row, the color code it and return as nothing further needs to be done.
|
||||
if (parser.CheckForGroupKeyWord(dataGridView.Rows[startingIndex].Cells[(int) SalesTableColumns.AdItem].EditedFormattedValue.ToString()) != "NoGroupFound")
|
||||
{
|
||||
dataGridView.Rows[startingIndex].DefaultCellStyle.BackColor = Color.Silver;
|
||||
return;
|
||||
}
|
||||
//Spin through the dataGridView rows starting at the row that fired the event.
|
||||
for (var i = startingIndex; i < (dataGridView.RowCount - 1); i++)
|
||||
{
|
||||
@@ -261,12 +255,13 @@ namespace AdvertsingProfitControl
|
||||
else if (rowStatus == RowAttribute.AdSpecialRow)
|
||||
{
|
||||
if(i == 0) return;
|
||||
dataGridView.Rows[startingIndex].DefaultCellStyle.BackColor = Color.Silver;
|
||||
//Get the previous row's attribute.
|
||||
rowStatus = parser.GetRowAttribute(dataGridView.Rows[i - 1]);
|
||||
if (rowStatus == RowAttribute.HeaderRow)
|
||||
{
|
||||
//Check to see if the previous row sees itself as a header row, if so mark it dirty.
|
||||
if (!(bool)dataGridView.Rows[i - 1].Cells[isHeaderColumn].EditedFormattedValue)
|
||||
if ((bool)dataGridView.Rows[i - 1].Cells[isHeaderColumn].EditedFormattedValue)
|
||||
{
|
||||
dataGridView.Rows[i - 1].Cells[isDirtyColumn].Value = true;
|
||||
dataGridView.Rows[i - 1].HeaderCell.Style.BackColor = ApplicationColors.PendingEdit;
|
||||
|
||||
Reference in New Issue
Block a user