| | |
| | | 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>(); |
| | |
| | | [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; |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Success!"; |
| | | objJsonResult.data = languagePack; |
| | | return objJsonResult; |
| | | var objJObj = JObject.FromObject(objJsonResult); |
| | | objJObj["EnableRemoteI18n"] = enableRemote; |
| | | return objJObj; |
| | | } else |
| | | { |
| | | // 版本号一致, 则直接返回读取的Json字符串 |
| | |
| | | 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) |
| | |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | var objJObj = JObject.FromObject(objJsonResult); |
| | | objJObj["EnableRemoteI18n"] = "N"; |
| | | return objJObj; |
| | | } |
| | | } |
| | | #endregion |