Cleaned up the code in the new modify record form and changed the return value from string to integer in the date ID get method. Fixed a crash bug in the new add record form and fixed the row number bug in both forms.

This commit is contained in:
2017-01-20 18:30:36 -06:00
parent 84f43538d1
commit 9fa2e3c44a
9 changed files with 253 additions and 195 deletions
+10 -3
View File
@@ -79,7 +79,7 @@ namespace AdvertsingProfitControl
else
{
//ELSE IF one was passed, then use it's ID to build the tables.
dateId = dataBaseReader.RetrieveDateIdByDateString(dateString, databaseTracker.DatabaseConnectionString);
dateId = dataBaseReader.RetrieveDateIdByDateString(dateString, databaseTracker.DatabaseConnectionString).ToString();
_console.WriteToLog(FrmLogConsole.Level.Info, dateId != "0" ? "Date ID for " + dateString + " is resolved to have the ID of " + dateId + "." : "The date " + dateString + " could not be found in the database.");
if (dateId == "0")
{
@@ -727,11 +727,11 @@ namespace AdvertsingProfitControl
double remaingingSales = _departmentSales - _SalesProducedByAdItems;
double totalProfitReturnFromReminaingSales = remaingingSales*.3;
double totalProfitReturn = _TotalProfitReturnFromAdItems + totalProfitReturnFromReminaingSales;
test.BuildFormFrontCompressedLayout(dateId, _departmentSales, _SalesProducedByAdItems, remaingingSales,
test.BuildFormFrontCompressedLayout(dateId.ToString(), _departmentSales, _SalesProducedByAdItems, remaingingSales,
_TotalProfitReturnFromAdItems, totalProfitReturnFromReminaingSales, totalProfitReturn,
commentsTextBox.Text);
test.RenderHtmlToImage();
backPageTest.GenerateWeeklyInventoryControlPage(dateId);
backPageTest.GenerateWeeklyInventoryControlPage(dateId.ToString());
backPageTest.RenderHtmlToImage();
}
else
@@ -765,6 +765,13 @@ namespace AdvertsingProfitControl
var form = new NewModifyRecord(date);
form.ShowDialog();
}
public enum FormRoll
{
AddRecords = 0,
ModifyRecords = 1,
DeleteRecords = 2
}
}
//http://stackoverflow.com/questions/487661/how-do-i-suspend-painting-for-a-control-and-its-children