Browse Source

多语言自定义

master
FoxV 2 years ago
parent
commit
96b45d49fa
  1. 6
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs
  2. 3
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  3. 4
      ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs

6
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs

@ -42,9 +42,11 @@ namespace ICSSoft.DataProject
DataTable table = DBHelper.SQlReturnData(sql, cmd);
string json = JsonConvert.SerializeObject(table);
LanguageModel model = JsonConvert.DeserializeObject<LanguageModel>(json);
List<LanguageModel> modelList = JsonConvert.DeserializeObject<List<LanguageModel>>(json);
// LanguageModel model = JsonConvert.DeserializeObject<LanguageModel>(json);
cmd.Transaction.Commit();
return model.DefineCode;
return modelList[0].DefineCode;
// return model.DefineCode;
}
catch(Exception ex)
{

3
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

@ -5076,7 +5076,8 @@ namespace ICSSoft.DataProject
cmd.Connection = conn;
try
{
string sql = @"select cnValue AS Name,Code from Sys_Language where 1=1";
string DefiniteLanguage = ICSDefiniteLanguageService.GetLanguage();
string sql = @"select " + DefiniteLanguage + " AS Name,Code from Sys_Language where 1=1";
if (!string.IsNullOrWhiteSpace(JsonData.Code))
{
sql += " and Code LIKE '%{0}%'";

4
ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs

@ -132,8 +132,8 @@ namespace ICSSoft.WebAPI.Controllers
//log.Info("站点传入值" + JsonData.ToString());
try
{
LanguageModel mode = new LanguageModel();
mode = JsonConvert.DeserializeObject<LanguageModel>(JsonData.ToString());
//LanguageModel mode = new LanguageModel();
//mode = JsonConvert.DeserializeObject<LanguageModel>(JsonData.ToString());
string resultStr = ICSDefiniteLanguageService.GetLanguage();
res.Success = true;
res.Message = LanguageHelper.GetNameSingle("WMSAPI001");// "接口调用成功!";

Loading…
Cancel
Save