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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user