1
zrg
1 天以前 639ea7256f10697d19c19cc878e999bcb7b1e6a1
WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs
@@ -18,6 +18,7 @@
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        grdAlignment omdelMian = new grdAlignment();
        List<grdAlignmentSub> omdelsub = new List<grdAlignmentSub>();
@@ -917,8 +918,23 @@
        [HttpGet]
        public object SelectMESLanguage_JSON(string language, bool forceUpdate)
        {
            try
            {
                // 判断是否启用多语言配置
               string enableRemote = oSystemParameter.GetSingleSystemParameter("Xt_grdAlignment_WMES_RemoteTransFileCTL", ref DBUtility.ClsPub.sErrInfo);
               if (enableRemote == "N")
               {
                   objJsonResult.code = "1";
                   objJsonResult.count = 1;
                   objJsonResult.Message = "Success!";
                   objJsonResult.data = null;
                   var objJObj = JObject.FromObject(objJsonResult);
                   objJObj["EnableRemoteI18n"] = enableRemote;
                   return objJObj;
               }
                // 获取项目根目录
                string path = HttpContext.Current.Server.MapPath($"~/LanguagePack"); ;
                string lang;
@@ -1042,7 +1058,9 @@
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Success!";
                    objJsonResult.data = languagePack;
                    return objJsonResult;
                    var objJObj = JObject.FromObject(objJsonResult);
                    objJObj["EnableRemoteI18n"] = enableRemote;
                    return objJObj;
                } else
                {
                    // 版本号一致, 则直接返回读取的Json字符串
@@ -1050,7 +1068,9 @@
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Success!";
                    objJsonResult.data = JObject.Parse(JsonStr1);
                    return objJsonResult;
                    var objJObj = JObject.FromObject(objJsonResult);
                    objJObj["EnableRemoteI18n"] = enableRemote;
                    return objJObj;
                }
            }
            catch(Exception e)
@@ -1060,7 +1080,9 @@
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
                var objJObj = JObject.FromObject(objJsonResult);
                objJObj["EnableRemoteI18n"] = "N";
                return objJObj;
            }
        }
        #endregion