Эх сурвалжийг харах

修复:调用顺序导致出错

JeffWang 3 жил өмнө
parent
commit
599868fde6

+ 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;