Commit 60130e2f authored by 李佳's avatar 李佳

半自动版本点击按钮打印报表会上传两次,干掉一次

parent 2e54d381
...@@ -183,11 +183,13 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -183,11 +183,13 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
void service_PrintTimeReportOver(object sender, EventArgs e) void service_PrintTimeReportOver(object sender, EventArgs e)
{ {
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true; autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
Logger.Log.Info("service_PrintTimeReportOver"); Logger.Log.Info("service_PrintTimeReportOver");
} }
void service_PrintMoneyReportOver(object sender, EventArgs e) void service_PrintMoneyReportOver(object sender, EventArgs e)
{ {
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true; autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
Logger.Log.Info("service_PrintMoneyReportOver"); Logger.Log.Info("service_PrintMoneyReportOver");
} }
...@@ -636,6 +638,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -636,6 +638,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
} }
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = false; autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = false;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = false;
try try
{ {
...@@ -652,6 +655,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -652,6 +655,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
{ {
MessageService.ShowMessage("请选择机器号", "操作提示"); MessageService.ShowMessage("请选择机器号", "操作提示");
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true; autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
return; return;
} }
} }
...@@ -659,12 +663,14 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -659,12 +663,14 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
{ {
LoggingService.Error(string.Concat("上传天报表异常。", ex)); LoggingService.Error(string.Concat("上传天报表异常。", ex));
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true; autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
} }
} }
void ToolStripButtonUpdateMoney_Click(object sender, EventArgs e) void ToolStripButtonUpdateMoney_Click(object sender, EventArgs e)
{ {
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = false;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = false; autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = false;
try try
{ {
...@@ -680,6 +686,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -680,6 +686,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
if (selectedMachineNum == 0) if (selectedMachineNum == 0)
{ {
MessageService.ShowMessage("请选择机器号", "操作提示"); MessageService.ShowMessage("请选择机器号", "操作提示");
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true; autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
return; return;
...@@ -688,6 +695,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint ...@@ -688,6 +695,7 @@ namespace ChuPiao.AutoPrint.Desktop.AutoPrint
catch (Exception ex) catch (Exception ex)
{ {
LoggingService.Error(string.Concat("上传缴款报表异常。", ex)); LoggingService.Error(string.Concat("上传缴款报表异常。", ex));
autoPrintToolStrip.ToolStripButtonPrintCurrentDayReport.Enabled = true;
autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true; autoPrintToolStrip.ToolStripButtonUpdateMoney.Enabled = true;
} }
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment