using System; using System.Collections.Generic; using System.Linq; using System.Text; using CY.IDAL; using CY.Model; using AbstractFactory; using CY.IBaseDAL; using CY.Infrastructure.DESEncrypt; using CY.Infrastructure.Query; using System.Data; namespace CY.BLL { /// /// 广告信息的业务逻辑类 /// public class Info_AdBLL { IInfo_AdDAL _IInfo_AdDal = null; /// /// 初始化构造 /// public Info_AdBLL() { //获取Info_Ad DAL实现 _IInfo_AdDal = Factory.GetDALByInterfaceName(DALInterface.IInfo_AdDAL) as IInfo_AdDAL; } /// /// 新增广告信息 /// /// /// /// /// public bool InsertModel(CY.Model.Info_Ad m_Info_Ad) { try { return _IInfo_AdDal.InserModel(m_Info_Ad); } catch (Exception ex) { throw ex; } } /// /// 修改广告信息 /// /// /// public bool UpdateModel(CY.Model.Info_Ad m_Info_Ad) { try { return _IInfo_AdDal.UpdateModel(m_Info_Ad); } catch (Exception ex) { throw ex; } } /// /// 删除广告信息 /// /// /// public bool DeleteModel(CY.Model.Info_Ad rType) { try { _IInfo_AdDal.DeleteModel(rType); } catch (Exception ex) { throw ex; } return true; } /// /// 根据编号查询单个信息 /// /// 编号 /// public Info_Ad SelectModelByKeyId(int? KeyId) { try { return _IInfo_AdDal.SelectModelByKeyId(KeyId); } catch (Exception ex) { throw ex; } } /// /// 查询全部广告 /// /// public DataTable SelectList() { return _IInfo_AdDal.SelectList(); } /// /// 根据版块名称和位置名称返回广告代码 /// /// /// /// public string SelectAdByLocationName(string ForumName, string LocationName) { return _IInfo_AdDal.SelectAdByLocationName(ForumName, LocationName); } /// /// 根据位置编号查询所有广告信息 /// /// /// public Info_Ad SelectListByAdLocationId(int? AdLocationId) { return _IInfo_AdDal.SelectListByAdLocationId(AdLocationId); } /// /// 列表查询 /// /// /// /// /// /// /// public IEnumerable SelectModelPage(Infrastructure.Query.Pagination pagination, int? Remark, int? locationid, string UserName, bool isNow) { return _IInfo_AdDal.SelectModelPage(pagination, Remark, locationid, UserName, isNow); } } }