You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.7 KiB
65 lines
1.7 KiB
using EasyBL.WebApi.Message;
|
|
using Entity.ShowEasyDtos;
|
|
using Entity.Sugar;
|
|
using Entity.ViewModels;
|
|
using SqlSugar;
|
|
using SqlSugar.Base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace EasyBL.WEBAPP.SYS
|
|
{
|
|
public class CurrencyMaintain_QryService : ServiceBase
|
|
{
|
|
|
|
public Dictionary<string, CurrencyDTO> FindAllByIDsAsDictionary(string sLanguageID)
|
|
{
|
|
|
|
Dictionary<string, CurrencyDTO> rsResult = new Dictionary<string, CurrencyDTO>();
|
|
|
|
string sError = null;
|
|
|
|
var db = SugarBase.GetIntance();
|
|
|
|
try
|
|
{
|
|
do
|
|
{
|
|
if (string.IsNullOrEmpty(sLanguageID))
|
|
{
|
|
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
|
|
}
|
|
|
|
var sArgumentClassID = "Currency";
|
|
|
|
var rsList = db.Queryable<OTB_SYS_Arguments>()
|
|
|
|
.Where(t1 => t1.Effective == "Y" && t1.DelStatus == "N")
|
|
.Where(t1 => t1.ArgumentClassID == sArgumentClassID)
|
|
.Select(t1 => new CurrencyDTO {
|
|
|
|
CurrencyCode = t1.ArgumentID,
|
|
CurrencyName = t1.ArgumentValue
|
|
|
|
})
|
|
.ToList();
|
|
|
|
foreach (var Currency in rsList)
|
|
{
|
|
rsResult[Currency.CurrencyCode] = Currency;
|
|
}
|
|
|
|
|
|
} while (false);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
sError = Util.GetLastExceptionMsg(ex);
|
|
}
|
|
|
|
return rsResult;
|
|
|
|
}
|
|
|
|
}
|
|
}
|