浏览代码

修复:调用顺序导致出错

JeffWang 3 年之前
父节点
当前提交
599868fde6
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      FactoryTool_CShare/Views/Login.cs

+ 4 - 3
FactoryTool_CShare/Views/Login.cs

@@ -174,19 +174,20 @@ namespace MOKA_Factory_Tools
                 enable = 2;
             }
 
+            // 保存登录信息;
+            CommonMethod.SaveLoginInfo(AccountText.Text, PwdText.Text);
+
             #region 三华MES登录数据
             if (CommonMethod.GetLoginAccout().Equals("Sanhua", StringComparison.OrdinalIgnoreCase))
             {
                 SanhuaMES sanhuaMES = new SanhuaMES();
-                if ( sanhuaMES.ShowDialog() != DialogResult.OK )
+                if (sanhuaMES.ShowDialog() != DialogResult.OK)
                 {
                     return;
                 }
             }
             #endregion
 
-            // 保存登录信息;
-            CommonMethod.SaveLoginInfo(AccountText.Text, PwdText.Text);
             CommonMethod.FactoryName = loginOutput1.factoryname;
             UpgradeMsgList upgradeMsgList = new UpgradeMsgList();
             var FactoryNum = loginOutput1.factorynum;