|
|
@ -94,6 +94,41 @@ namespace EasyBL.WEBAPP.SYS |
|
|
|
|
|
|
|
#endregion 聯繫方式管理(SETB_CRM_Contact 以ID查詢)
|
|
|
|
|
|
|
|
public Dictionary<string, SETB_CRM_Contact> FindAllByIDsAsDictionary(string sAccount, string sContactID) { |
|
|
|
|
|
|
|
string sMsg = null; |
|
|
|
var db = SugarBase.GetIntance(); |
|
|
|
|
|
|
|
Dictionary<string, SETB_CRM_Contact> rsContactDic = new Dictionary<string, SETB_CRM_Contact>(); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
var saContactList = db.Queryable<SETB_CRM_Contact>() |
|
|
|
.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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |