Browse Source

[WHAT] 供應商以ID查詢

Dev
berlin-tzen 2 years ago
parent
commit
9f1588051e
  1. 45
      EuroTran/EasyBL.WEBAPP/ShowEasy/SupplierMaintain_QryService.cs

45
EuroTran/EasyBL.WEBAPP/ShowEasy/SupplierMaintain_QryService.cs

@ -287,5 +287,50 @@ namespace EasyBL.WEBAPP.ShowEasy
}
#endregion 參數類別(多筆)
public Dictionary<string, View_SCM_Supplier> FindAllByIDsAsDictionary(string sLanguageID) {
Dictionary<string, View_SCM_Supplier> rsSupplierDic = new Dictionary<string, View_SCM_Supplier>();
string sMsg = null;
var db = SugarBase.GetIntance();
try
{
do
{
if (string.IsNullOrEmpty(sLanguageID))
{
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
}
var rsSupplierList = db.Queryable<SETB_SCM_Supplier>()
.Where(t1 => t1.Effective == "Y")
.Where(t1 => t1.LangType == sLanguageID)
.Select(t1 => new View_SCM_Supplier {
SupplierID = SqlFunc.GetSelfAndAutoFill(t1.SupplierID)
})
.ToList();
foreach (var Supplier in rsSupplierList) {
rsSupplierDic[Supplier.SupplierID] = Supplier;
}
return rsSupplierDic;
} while (false);
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
}
return rsSupplierDic;
}
}
}
Loading…
Cancel
Save