You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

100 lines
2.4 KiB

using Entity.Sugar;
using SqlSugar.Base;
using System;
using System.Collections.Generic;
namespace EasyBL.WEBAPP.SYS
{
public class ContactMaintain_QryService : ServiceBase
{
#region 聯繫方式管理(List 查詢聯繫方式)
/// <summary>
/// 聯繫方式管理(List 查詢聯繫方式)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public List<SETB_CRM_Contact> QueryContactList(string sOrgID, string sAccount)
{
string sMsg = null;
var db = SugarBase.GetIntance();
var rsContactList = new List<SETB_CRM_Contact>();
try
{
do
{
rsContactList = db.Queryable<SETB_CRM_Contact>()
.Where(t1 => t1.OrgID == sOrgID)
.Where(t1 => t1.Account == sAccount)
.ToList();
} while (false);
return rsContactList;
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
}
finally
{
}
return rsContactList;
}
#endregion 聯繫方式管理(List 查詢聯繫方式)
#region 聯繫方式管理(SETB_CRM_Contact 以ID查詢)
/// <summary>
/// 聯繫方式管理(SETB_CRM_Contact 以ID查詢)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
public SETB_CRM_Contact FindByIDs(string sContactID, string sAccount)
{
string sMsg = null;
var db = SugarBase.GetIntance();
SETB_CRM_Contact rsContact = null;
try
{
do
{
rsContact = db.Queryable<SETB_CRM_Contact>()
.Where(t1 => t1.ContactID == sContactID)
.Where(t1 => t1.Account == sAccount)
.Single();
} while (false);
return rsContact;
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
}
finally
{
}
return rsContact;
}
#endregion 聯繫方式管理(SETB_CRM_Contact 以ID查詢)
}
}