Removed a few unused columns and flags that didn't help improve the performance of the form or just made its code more cluttered. Created a separate method to handle calling the database writing code for the Sales Tables.

This commit is contained in:
2016-11-11 15:21:04 -06:00
parent 9105429fcb
commit 35e90a6f86
11 changed files with 81 additions and 251 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ namespace AdvertsingProfitControl
var i = 0;
foreach (DataGridViewCell cell in row.Cells)
{
if (cell.ColumnIndex >= (int) SalesTableColumns.IsHeaderRow) { i++; continue;}
if (cell.ColumnIndex >= (int) SalesTableColumns.IsHeaderRow || cell.ColumnIndex == 0) { i++; continue;}
//Strip all whitespace characters from the cell, this includes vertical tabs, newlines, and any number of spaces.
var cellContentsStripped = new string(cell.EditedFormattedValue.ToString().Where(c => !char.IsWhiteSpace(c)).ToArray());
//Now remove all zeros, including any decimal points as these values are meaningless.