From e47c9b867ecc8b3574a800aea4be8ccfbf9812a3 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Mon, 20 Feb 2023 14:08:17 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E8=81=AF=E7=B5=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BB=A5ID=E6=9F=A5=E8=A9=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/ContactMaintain_QryService.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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; + + } + }