diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ContactMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ContactMaintain_QryService.cs index 16e822b..06bc75e 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ContactMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ContactMaintain_QryService.cs @@ -94,6 +94,41 @@ namespace EasyBL.WEBAPP.SYS #endregion 聯繫方式管理(SETB_CRM_Contact 以ID查詢) + public Dictionary FindAllByIDsAsDictionary(string sAccount, string sContactID) { + + string sMsg = null; + var db = SugarBase.GetIntance(); + + Dictionary rsContactDic = new Dictionary(); + + try + { + do + { + var saContactList = db.Queryable() + .WhereIF(!string.IsNullOrEmpty(sAccount), t1 => t1.Account == sAccount) + .WhereIF(!string.IsNullOrEmpty(sContactID), t1 => t1.ContactID == sContactID) + .ToList(); + + foreach (var Contact in saContactList) + { + rsContactDic[Contact.ContactID] = Contact; + } + + return rsContactDic; + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + + } + + return rsContactDic; + + } + }