Updated the Inventory table's parsing engine, now correctly copies a reference table's grouping info. Updated the New Modify Record form to group rows in the Inventory table based on the Actual Sales table before insertion into the database.
This commit is contained in:
@@ -525,11 +525,13 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
_isFormDirty = true;
|
||||
}
|
||||
//TableGroupParser.PaintRowGroupsFromIndex(e.RowIndex, dataGridView);
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: Update Inventory table parser.
|
||||
if (TableGroupParser.PaintIneventory(inventoryDataGridView, projectionsDataGridView, e.RowIndex))
|
||||
{
|
||||
_isFormDirty = true;
|
||||
}
|
||||
}
|
||||
//Add in used Ad Items to the list.
|
||||
if (userInput == string.Empty) return;
|
||||
@@ -1028,7 +1030,12 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
inventoryDataGridView.Rows[e.RowIndex].Cells[(int) TableGroupParser.InventoryTableColumns.AdItem].Value = userInput;
|
||||
}
|
||||
TableGroupParser.PaintInventoryRowGroups(e.RowIndex - 1, inventoryDataGridView, projectionsDataGridView); //TODO:CHANGED .PaintRowGroupsFromIndex(e.RowIndex - 1, inventoryDataGridView);
|
||||
if (TableGroupParser.PaintIneventory(inventoryDataGridView,
|
||||
projectionsDataGridView,
|
||||
e.RowIndex - 1))
|
||||
{
|
||||
_isFormDirty = true;
|
||||
}
|
||||
if (actualSalesDataGridView.RowCount > e.RowIndex)
|
||||
{
|
||||
actualSalesDataGridView.Rows[e.RowIndex].Cells[(int) TableGroupParser.SalesTableColumns.AdItem].Value = userInput;
|
||||
@@ -1554,7 +1561,12 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
inventoryDataGridView.Rows[e.RowIndex].Cells[(int)TableGroupParser.InventoryTableColumns.AdItem].Value = userInput;
|
||||
}
|
||||
TableGroupParser.PaintInventoryRowGroups(e.RowIndex - 1, inventoryDataGridView, projectionsDataGridView); //TODO:CHANGE .PaintRowGroupsFromIndex(e.RowIndex - 1, inventoryDataGridView);
|
||||
if (TableGroupParser.PaintIneventory(inventoryDataGridView,
|
||||
projectionsDataGridView,
|
||||
e.RowIndex - 1))
|
||||
{
|
||||
_isFormDirty = true;
|
||||
}
|
||||
if (actualSalesDataGridView.RowCount > e.RowIndex)
|
||||
{
|
||||
actualSalesDataGridView.Rows[e.RowIndex].Cells[(int)TableGroupParser.SalesTableColumns.AdItem].Value = userInput;
|
||||
@@ -1884,7 +1896,10 @@ out double beginningBinCount, out string newBinText))
|
||||
projectionsDataGridView.RefreshEdit();
|
||||
inventoryDataGridView.RefreshEdit();
|
||||
actualSalesDataGridView.RefreshEdit();
|
||||
TableGroupParser.PaintInventoryRowGroups(0, inventoryDataGridView, projectionsDataGridView); //TODO: CHANEG.PaintRowGroups(dataGridView);
|
||||
if (TableGroupParser.PaintIneventory(inventoryDataGridView, projectionsDataGridView, 0))
|
||||
{
|
||||
_isFormDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -2153,7 +2168,7 @@ out double beginningBinCount, out string newBinText))
|
||||
Name = name,
|
||||
HeaderText = TextFormat.AddSpacesToSentence(name, false),
|
||||
ValueType = typeof(bool),
|
||||
//Visible = false,
|
||||
Visible = false,
|
||||
SortMode = DataGridViewColumnSortMode.NotSortable
|
||||
};
|
||||
projectionsDataGridView.Columns.Add(column);
|
||||
@@ -3305,7 +3320,7 @@ out double beginningBinCount, out string newBinText))
|
||||
//Force update all the data tables.
|
||||
//Paint the groups and check if the form should be marked as dirty.
|
||||
TableGroupParser.PaintRowGroups(projectionsDataGridView, 0, true);
|
||||
TableGroupParser.PaintRowGroups(inventoryDataGridView, 0, true);
|
||||
TableGroupParser.PaintIneventory(inventoryDataGridView, actualSalesDataGridView, 0, true);
|
||||
TableGroupParser.PaintRowGroups(actualSalesDataGridView, 0, true);
|
||||
using (var scope = new TransactionScope())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user