|
|
@ -1943,24 +1943,29 @@ namespace EasyBL.WEBAPP.ShowEasy |
|
|
|
} |
|
|
|
|
|
|
|
//QueryALLOnSiteServiceAsDic
|
|
|
|
public Dictionary<string, SETB_PDT_ONSiteBaseInfo> FindAllByIDsAsDictionary(string ServiceID) |
|
|
|
public Dictionary<string, View_PDT_ONSiteBaseInfo> FindAllByIDsAsDictionary(string sLanguageID, string ServiceID) |
|
|
|
{ |
|
|
|
|
|
|
|
string sMsg = null; |
|
|
|
|
|
|
|
var db = SugarBase.GetIntance(); |
|
|
|
|
|
|
|
Dictionary<string, SETB_PDT_ONSiteBaseInfo> saServiceDic = new Dictionary<string, SETB_PDT_ONSiteBaseInfo>(); |
|
|
|
Dictionary<string, View_PDT_ONSiteBaseInfo> saServiceDic = new Dictionary<string, View_PDT_ONSiteBaseInfo>(); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(sLanguageID)) { |
|
|
|
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE; |
|
|
|
} |
|
|
|
|
|
|
|
var saServiceList = db.Queryable<SETB_PDT_ONSiteBaseInfo>() |
|
|
|
.Where(t1 => t1.Effective == "Y") |
|
|
|
.Where(t1 => t1.LangID == sLanguageID) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(ServiceID), t1 => t1.ServiceID == ServiceID) |
|
|
|
.Select((t1) => new SETB_PDT_ONSiteBaseInfo |
|
|
|
.Select((t1) => new View_PDT_ONSiteBaseInfo |
|
|
|
{ |
|
|
|
|
|
|
|
ServiceID = SqlFunc.GetSelfAndAutoFill(t1.ServiceID) |
|
|
@ -1987,6 +1992,31 @@ namespace EasyBL.WEBAPP.ShowEasy |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public Dictionary<string, View_PDT_ONSiteBaseInfo> FindAllDetailByIDsAsDictionary(string sLanguageID, string ServiceID) { |
|
|
|
|
|
|
|
var OnSiteServiceDic = FindAllByIDsAsDictionary(sLanguageID, ServiceID); |
|
|
|
|
|
|
|
SupplierMaintain_QryService sm_qry = new SupplierMaintain_QryService(); |
|
|
|
var SupplierDic = sm_qry.FindAllByIDsAsDictionary(sLanguageID); |
|
|
|
|
|
|
|
foreach (var OnSiteService in OnSiteServiceDic.Values) { |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(OnSiteService.SupplierID)) { |
|
|
|
|
|
|
|
if (SupplierDic.ContainsKey(OnSiteService.SupplierID)) { |
|
|
|
var rsSupplier = SupplierDic[OnSiteService.SupplierID]; |
|
|
|
OnSiteServiceDic[OnSiteService.ServiceID].SupplierName = rsSupplier.CompanyName; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return OnSiteServiceDic; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|