Fixed a bug where ad specials wasn't being processed properly. Updated the main form to add up all data in the Invoice Net Amount at Cost column instead of the Extended Retail column. Minor behavior fixes.

This commit is contained in:
2017-04-15 12:38:55 -05:00
parent c334c9aa53
commit 61f369f7fe
6 changed files with 75 additions and 23 deletions
+15 -6
View File
@@ -10,9 +10,13 @@ namespace AdvertsingProfitControl
public static void LogError(object sender, System.Threading.ThreadExceptionEventArgs e)
{
if (!Directory.Exists(LogFilePath))
{
Directory.CreateDirectory(LogFilePath);
}
using (
var file =
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("MM-dd-yyyy") + ".log", true))
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("d") + ".log", true))
{
file.WriteLine(DateTime.Now + ": Unhandled Thread Exception:\n" + e.Exception.Message + Environment.NewLine);
MessageBox.Show(@"An unhandled thread exception has occurred. Advertising Profit Control will be forced to exit.",
@@ -23,9 +27,11 @@ namespace AdvertsingProfitControl
public static void LogError(object sender, UnhandledExceptionEventArgs e)
{
using (
var file =
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("MM-dd-yyyy") + ".log", true))
if (!Directory.Exists(LogFilePath))
{
Directory.CreateDirectory(LogFilePath);
}
using (var file = new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("d") + ".log", true))
{
file.WriteLine(DateTime.Now + ": An unhandled exception occurred. \nException Object: " + e.ExceptionObject + Environment.NewLine);
MessageBox.Show(@"And unknown error has occurred. Advertising Profit Control will be forced to exit.",
@@ -36,9 +42,12 @@ namespace AdvertsingProfitControl
public static void WriteToLog(string message)
{
if (!Directory.Exists(LogFilePath))
{
Directory.CreateDirectory(LogFilePath);
}
using (
var file =
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\Information.log", true))
var file = new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\Information.log", true))
{
file.WriteLine(message);
}