浏览代码

Fix to bug on MainWindow timesheet bypass

Kenric Nugteren 4 月之前
父节点
当前提交
a2ba23a996
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      prs.desktop/MainWindow.xaml.cs

+ 4 - 3
prs.desktop/MainWindow.xaml.cs

@@ -1658,7 +1658,10 @@ public partial class MainWindow : IPanelHostControl
         }
         }
         else
         else
         {
         {
-            MessageWindow.ShowMessage("You must clock on before logging in to PRS!", "Not clocked in.");
+            Dispatcher.Invoke(() =>
+            {
+                MessageWindow.ShowMessage("You must clock on before logging in to PRS!", "Not clocked in.");
+            });
             ClientFactory.InvalidateUser();
             ClientFactory.InvalidateUser();
             App.EmployeeID = Guid.Empty;
             App.EmployeeID = Guid.Empty;
             App.EmployeeName = "";
             App.EmployeeName = "";
@@ -1861,8 +1864,6 @@ public partial class MainWindow : IPanelHostControl
         {
         {
             if (!isClockedOn)
             if (!isClockedOn)
             {
             {
-                if (message)
-                    MessageBox.Show("You must clock on before opening this screen");
                 return false;
                 return false;
             }
             }