|
|
@ -4,6 +4,7 @@ using SqlSugar; |
|
|
|
using SqlSugar.Base; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
namespace EasyBL.WEBAPP.SYS |
|
|
|
{ |
|
|
@ -129,7 +130,42 @@ namespace EasyBL.WEBAPP.SYS |
|
|
|
|
|
|
|
#endregion 公司資訊管理(SETB_CRM_Company 以ID查詢)
|
|
|
|
|
|
|
|
public Dictionary<string, SETB_CRM_Company> FindAllByIDsAsDictionary(string sAccount, string sCompanyID) { |
|
|
|
|
|
|
|
string sMsg = null; |
|
|
|
var db = SugarBase.GetIntance(); |
|
|
|
|
|
|
|
Dictionary<string, SETB_CRM_Company> saCompanyDic = new Dictionary<string, SETB_CRM_Company>(); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
var saCompanyList = db.Queryable<SETB_CRM_Company>() |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sAccount), t1 => t1.Account == sAccount) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sCompanyID), t1 => t1.CompanyID == sCompanyID) |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
foreach (var Company in saCompanyList) |
|
|
|
{ |
|
|
|
saCompanyDic[Company.CompanyID] = Company; |
|
|
|
} |
|
|
|
|
|
|
|
return saCompanyDic; |
|
|
|
|
|
|
|
} while (false); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
sMsg = Util.GetLastExceptionMsg(ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return saCompanyDic; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |