Quick crash bug fix with the row parsing engine where an existing, unchanged, header row is marked as dirty by the engine.
This commit is contained in:
@@ -146,7 +146,7 @@ namespace AdvertsingProfitControl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//IF the previous row is a header row, then color it as a group header and color the current row as a member of said group.
|
//IF the previous row is a header row, then color it as a group header and color the current row as a member of said group.
|
||||||
else if (rowStatus == RowAttribute.HeaderRow)
|
else if (rowStatus == RowAttribute.HeaderRow && !(bool)dataGridView.Rows[i - 1].Cells[isHeaderColumn].Value)
|
||||||
{
|
{
|
||||||
//Set the previous row as a header row.
|
//Set the previous row as a header row.
|
||||||
dataGridView.Rows[i - 1].Cells[isHeaderColumn].Value = true;
|
dataGridView.Rows[i - 1].Cells[isHeaderColumn].Value = true;
|
||||||
|
|||||||
@@ -1063,28 +1063,13 @@ namespace AdvertsingProfitControl
|
|||||||
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
break;
|
break;
|
||||||
case (int)SalesTableColumns.SalePrice:
|
case (int)SalesTableColumns.SalePrice:
|
||||||
//IF the Sale Price cell is empty then place 0.00 into the array as a place holder value (assuming this row is a HeaderRow).
|
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
if (projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString() == string.Empty)
|
|
||||||
{
|
|
||||||
rowContents[i] = string.Empty;
|
|
||||||
}
|
|
||||||
//ELSE place the value from the Projections table into the array, since Sale Price can be determined before actual data is used.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case (int)SalesTableColumns.Cost:
|
case (int)SalesTableColumns.Cost:
|
||||||
//IF the Cost cell is empty then place 0.00 into the array as a place holder value (assuming this row is a HeaderRow).
|
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
if (projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString() == string.Empty)
|
break;
|
||||||
{
|
case (int)SalesTableColumns.ProfitReturn:
|
||||||
rowContents[i] = string.Empty;
|
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
}
|
|
||||||
//ELSE place the value from the Projections table into the array, since Cost can be determined before actual data is used.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rowContents[i] = projectionsDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case (int)SalesTableColumns.IsDirty:
|
case (int)SalesTableColumns.IsDirty:
|
||||||
rowContents[i] = true;
|
rowContents[i] = true;
|
||||||
@@ -1623,6 +1608,9 @@ namespace AdvertsingProfitControl
|
|||||||
case (int)SalesTableColumns.Cost:
|
case (int)SalesTableColumns.Cost:
|
||||||
rowContents[i] = actualSalesDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
rowContents[i] = actualSalesDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
break;
|
break;
|
||||||
|
case (int)SalesTableColumns.ProfitReturn:
|
||||||
|
rowContents[i] = actualSalesDataGridView.Rows[e.RowIndex].Cells[i].EditedFormattedValue.ToString();
|
||||||
|
break;
|
||||||
case (int)SalesTableColumns.IsDirty:
|
case (int)SalesTableColumns.IsDirty:
|
||||||
rowContents[i] = true;
|
rowContents[i] = true;
|
||||||
break;
|
break;
|
||||||
@@ -2477,8 +2465,8 @@ namespace AdvertsingProfitControl
|
|||||||
//Check the attribute cell.
|
//Check the attribute cell.
|
||||||
if (cellIndex == 8)
|
if (cellIndex == 8)
|
||||||
{
|
{
|
||||||
var isHeaderCell = new DataGridViewCheckBoxCell(false);
|
var isHeaderCell = new DataGridViewCheckBoxCell();
|
||||||
var isMemberCell = new DataGridViewCheckBoxCell(false);
|
var isMemberCell = new DataGridViewCheckBoxCell();
|
||||||
var rowAttribute = int.Parse(projections.Rows[rowIndex].ItemArray[cellIndex].ToString());
|
var rowAttribute = int.Parse(projections.Rows[rowIndex].ItemArray[cellIndex].ToString());
|
||||||
switch (rowAttribute)
|
switch (rowAttribute)
|
||||||
{
|
{
|
||||||
@@ -2492,6 +2480,10 @@ namespace AdvertsingProfitControl
|
|||||||
isMemberCell.Value = true;
|
isMemberCell.Value = true;
|
||||||
newRow.DefaultCellStyle.BackColor = ApplicationColors.MemberRow;
|
newRow.DefaultCellStyle.BackColor = ApplicationColors.MemberRow;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
isHeaderCell.Value = false;
|
||||||
|
isMemberCell.Value = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
newRow.Cells.Add(isHeaderCell);
|
newRow.Cells.Add(isHeaderCell);
|
||||||
newRow.Cells.Add(isMemberCell);
|
newRow.Cells.Add(isMemberCell);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>7F/RAhUMV4Hdn8Z9v/Nt+yIctA8A8oX18FGf/FPA/ic=</dsig:DigestValue>
|
<dsig:DigestValue>b7XWNTKdLoveai+Ezig6qhdfRQNnqDFOegZLHdvzxx0=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@@ -43,14 +43,14 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="AdvertsingProfitControl.exe" size="3614208">
|
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="AdvertsingProfitControl.exe" size="3613184">
|
||||||
<assemblyIdentity name="AdvertsingProfitControl" version="0.9.5.2" language="neutral" processorArchitecture="amd64" />
|
<assemblyIdentity name="AdvertsingProfitControl" version="0.9.5.2" language="neutral" processorArchitecture="amd64" />
|
||||||
<hash>
|
<hash>
|
||||||
<dsig:Transforms>
|
<dsig:Transforms>
|
||||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||||
</dsig:Transforms>
|
</dsig:Transforms>
|
||||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||||
<dsig:DigestValue>9SCbSUpZiztSoLlr90+nJ7hNTimDeyfaAkBthVk+33U=</dsig:DigestValue>
|
<dsig:DigestValue>JdsSdLXGV6xF3G52D7+6tloy6VbDDJnLshBRhBOm3iQ=</dsig:DigestValue>
|
||||||
</hash>
|
</hash>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
Reference in New Issue
Block a user