Marked as 'AdvertsingProfitControl 0.9.5.2' by its folder. I believe this version is where most of the main interface for the user was complete and I was toying with the idea of allowing the user to change the shrink on the main form.
This commit is contained in:
@@ -8,20 +8,21 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
internal class RowParsing
|
||||
{
|
||||
public static List<string> _adSpecialGroups = new List<string>();
|
||||
public static List<string> AdSpecialGroups = new List<string>();
|
||||
|
||||
public string CheckForGroupKeyWord(string cellContents)
|
||||
{
|
||||
var keyWord = "NoGroupFound";
|
||||
|
||||
var query = from adI in _adSpecialGroups
|
||||
var query = from adI in AdSpecialGroups
|
||||
where adI.Equals(cellContents, StringComparison.InvariantCultureIgnoreCase)
|
||||
select adI;
|
||||
|
||||
if (query.ToArray().Length > 0)
|
||||
var enumerable = query as string[] ?? query.ToArray();
|
||||
if (enumerable.ToArray().Length > 0)
|
||||
{
|
||||
//Grab the first object in the array and return it.
|
||||
keyWord = query.ToArray().First();
|
||||
keyWord = enumerable.ToArray().First();
|
||||
}
|
||||
|
||||
return keyWord;
|
||||
@@ -50,6 +51,7 @@ namespace AdvertsingProfitControl
|
||||
var i = 0;
|
||||
foreach (DataGridViewCell cell in row.Cells)
|
||||
{
|
||||
if (cell.ColumnIndex >= (int) SalesTableColumns.IsHeaderRow) { 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.
|
||||
@@ -60,7 +62,7 @@ namespace AdvertsingProfitControl
|
||||
rowContents.Add(cell.EditedFormattedValue.ToString());
|
||||
}
|
||||
//If the first cell contains nothing, then return as IncompleteRow.
|
||||
else if (cellContentsStripped == "" && i == 0)
|
||||
else if (cellContentsStripped == "" && i == (int) SalesTableColumns.AdItem)
|
||||
{
|
||||
return RowAttribute.IncompleteRow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user