using System; using System.Collections.Generic; using System.Linq; using System.Text; using SOH.Data; using SOH.Entities; using EAS.Data; using EAS.Services; using EAS.Data.Linq; using EAS.Data.ORM; using SOH.Entities.DTO; namespace SOH.BLL { [ServiceObject("套餐业务处理")] [ServiceBind(typeof(ITjtmdy))] public class TjtmdyBll:ITjtmdy { public List GetTjdwForTmdy(short fddm,string dwmc) { using (DbEntities db = new DbEntities()) { bool ifmc=false; DateTime dt = DateTime.Now; if(string.IsNullOrEmpty(dwmc)) { ifmc=true; } var data = from a in db.t_hts join b in db.t_khs on a.khbm equals b.khbm where (a.htzt == 0 || a.htzt == 1) && (ifmc ? true : b.khmc.Contains(dwmc)) && a.htjzrq>dt select new dto_tjkhht { htbm = a.htbm, htbj = a.htbj, nd = a.nd, khmc = b.khmc }; if (data.Any()) { return data.ToList(); } else { return null; } } } } }