Browse Source

[WHAT] 新增以ID查詢參數

Dev
berlin-tzen 2 years ago
parent
commit
8b54651c3f
  1. 55
      EuroTran/EasyBL.WEBAPP/SYS/ArgumentMaintain_QryService.cs

55
EuroTran/EasyBL.WEBAPP/SYS/ArgumentMaintain_QryService.cs

@ -212,5 +212,60 @@ namespace EasyBL.WEBAPP.SYS
}
#endregion 參數值(更新排序)
#region 參數管理(Dictionary 以ID查詢所有參數)
/// <summary>
/// 參數管理(Dictionary 以ID查詢所有參數)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public Dictionary<string, OTB_SYS_Arguments> FindAllByIDsAsDictionary(string sLanguageID, string sOrgID, string sArgumentClassID) {
Dictionary<string, OTB_SYS_Arguments> rsResult = new Dictionary<string, OTB_SYS_Arguments>();
string sMsg = null;
var db = SugarBase.GetIntance();
try
{
do
{
if (string.IsNullOrEmpty(sOrgID)) {
sOrgID = WebAppGlobalConstWord.TG_ORGID;
}
if (string.IsNullOrEmpty(sLanguageID)) {
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
}
var saArgumentList = db.Queryable<OTB_SYS_Arguments>()
.Where(t1 => t1.OrgID == sOrgID)
.Where(t1 => t1.Effective == "Y")
.Where(t1 => t1.DelStatus == "N")
//.Where(t1 => t1.LanguageID == sLanguageID)
.Where(t1 => t1.ArgumentClassID == sArgumentClassID)
.OrderBy(x => x.OrderByValue)
.ToList();
foreach (var Arg in saArgumentList) {
rsResult[Arg.ArgumentID] = Arg;
}
return rsResult;
} while (false);
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
}
return rsResult;
}
#endregion 參數管理(Dictionary 以ID查詢所有參數)
}
}
Loading…
Cancel
Save