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 { /// /// 获取全部模版 /// /// public List getList() { using (var db = new WX.CRM.Model.Entity.crmContext()) { return db.SMS_BATCHMSGTEMPLATE.ToList(); } } public List 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); } } } }