/** * EC_QuoteDemandBLL.cs * * 功 能: 报价需求业务逻辑 * 类 名: EC_QuoteDemandBLL * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-12 9:23 吴崎均 初版 * V0.02 2013-4-17 17:10 吴崎均 新增分页实现、获取单个实体实现 * V0.03 2013-4-18 16:00 吴崎均 新增批量删除 * V0.04 2013-5-28 13:50 吴崎均 修改批量删除方法定义及实现 * V0.05 2013-6-2 10:45 吴崎均 增加修改状态方法 * * * * * * */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using CY.IDAL; using AbstractFactory; using CY.Model; namespace CY.BLL.EC { /// /// 需求信息业务逻辑 /// public class EC_QuoteDemandBLL { IEC_QuoteDemandDAL _iEC_QuoteDemandDAL = null; /// /// 初始化 /// public EC_QuoteDemandBLL() { _iEC_QuoteDemandDAL = Factory.GetDALByInterfaceName(DALInterface.IEC_QuoteDemandDAL) as IEC_QuoteDemandDAL; } /// /// 添加数据 /// /// 模型实例 /// public bool AddData(EC_QuoteDemand EC_QuoteDemand) { return _iEC_QuoteDemandDAL.InserModel(EC_QuoteDemand); } /// /// 更新数据 /// /// 模型实例 /// public bool UpdateData(EC_QuoteDemand EC_QuoteDemand) { return _iEC_QuoteDemandDAL.UpdateModel(EC_QuoteDemand); } /// /// 删除数据 /// /// 模型实例 /// public bool DeleteData(EC_QuoteDemand EC_QuoteDemand) { return _iEC_QuoteDemandDAL.DeleteModel(EC_QuoteDemand); } /// /// 根据编号获取实体信息 /// /// 主键编号 /// public EC_QuoteDemand SelectModleById(int id) { return _iEC_QuoteDemandDAL.SelectModleById(id); } /// /// 根据编号批量删除数据 /// /// 当前操作人 /// 编号集合 /// public bool DeleteDataByIds(string currentOperator, params int[] ids) { return _iEC_QuoteDemandDAL.DeleteDataByIds(currentOperator, ids); } /// /// 分页查询 /// /// 查询对象 /// 分页对象 /// public IEnumerable SelectModelPage(Infrastructure.Query.Query query, Infrastructure.Query.Pagination pagination) { return _iEC_QuoteDemandDAL.SelectModelPage(query, pagination); } /// /// 分页查询(前台用) /// /// 分页对象 /// 省 /// 市 /// 印刷类型 /// public IEnumerable SelectModelPage(Infrastructure.Query.Pagination pagination, string province = "", string city = "", int printTypeId = -1) { return _iEC_QuoteDemandDAL.SelectModelPage(pagination, province, city, printTypeId); } /// /// 分页查询(后台用) /// /// 分页对象 /// 会员编号 /// 名称 /// 开始时间 /// 结束时间 /// 印刷类型 /// 状态 /// public IEnumerable SelectModelPage(Infrastructure.Query.Pagination pagination, Guid memberId, string name, DateTime? beginDate, DateTime? endDate, int printTypeId = -1, int? state = null) { return _iEC_QuoteDemandDAL.SelectModelPage(pagination, memberId, name, beginDate, endDate, printTypeId, state); } /// /// 改变用户需求业务状态 /// /// 数据编号 /// 状态 /// public bool ChangeState(int id, int state) { return _iEC_QuoteDemandDAL.ChangeState(id, state); } /// /// 检测是否第一次发布需求 /// /// /// public bool IsTodayHasValue(Guid MemberId) { return _iEC_QuoteDemandDAL.IsTodayHasValue(MemberId); } /// /// 判断能不能发布相同需求 /// /// /// /// public bool CanInsertModel(Guid MemberId, string demand) { return _iEC_QuoteDemandDAL.CanInsertModel(MemberId,demand); } /// /// 获取当天发布的发布状态下的需求与下单要求一致的需求信息 /// /// /// /// public EC_QuoteDemand GetModelByCanDel(Guid MemberId, string demand) { return _iEC_QuoteDemandDAL.GetModelByCanDel(MemberId, demand); } /// /// 删除需求 /// /// /// public bool DelModel(int keyId) { return _iEC_QuoteDemandDAL.DelModel(keyId); } } }