ComplianceServer/oldcode/BLL/Sms/SMS_BATCHMSGTEMPLATE_BL.cs

41 lines
1.1 KiB
C#

using System.Collections.Generic;
using System.Linq;
using WX.CRM.IBLL.Sms;
using WX.CRM.Model.Entity;
namespace WX.CRM.BLL.Sms
{
public class SMS_BATCHMSGTEMPLATE_BL : ISMS_BATCHMSGTEMPLATE_Q, ISMS_BATCHMSGTEMPLATE
{
/// <summary>
/// 获取全部模版
/// </summary>
/// <returns></returns>
public List<SMS_BATCHMSGTEMPLATE> getList()
{
using (var db = new WX.CRM.Model.Entity.crmContext())
{
return db.SMS_BATCHMSGTEMPLATE.ToList();
}
}
public List<SMS_BATCHMSGTEMPLATE> getTempLateBySubtypeid(int subTypeId)
{
using (var db = new WX.CRM.Model.Entity.crmContext())
{
return db.SMS_BATCHMSGTEMPLATE.Where(p => p.SUBTYPEID == subTypeId).ToList();
}
}
public SMS_BATCHMSGTEMPLATE getTempLateBypkid(int pkid)
{
using (var db = new WX.CRM.Model.Entity.crmContext())
{
return db.SMS_BATCHMSGTEMPLATE.FirstOrDefault(p => p.PKID == pkid);
}
}
}
}