/** * OA_ShiJuanBiaoQianBLL.cs * * 功 能: 合作客户业务逻辑类 * 类 名: OA_ShiJuanBiaoQianBLL * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-2 15:11 吴辉 初版 * V0.02 2013-5-29 17:43 吴崎均 增加转换在线会员为厂商客户方法 * * * * * * */ 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; namespace CY.BLL { public class OA_ShiJuanBiaoQianBLL { IOA_ShiJuanBiaoQianDAL _IOA_ShiJuanBiaoQianDAL = null; /// /// 初始化构造 /// public OA_ShiJuanBiaoQianBLL() { //获取OA_ShiJuanBiaoQian DAL实现 _IOA_ShiJuanBiaoQianDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_ShiJuanBiaoQianDAL) as IOA_ShiJuanBiaoQianDAL; } /// /// 新增送货安排 /// /// /// /// /// public bool InsertModel(CY.Model.OA_ShiJuanBiaoQian m_OA_ShiJuanBiaoQian) { try { return _IOA_ShiJuanBiaoQianDAL.InserModel(m_OA_ShiJuanBiaoQian); } catch (Exception ex) { throw ex; } } /// /// 修改送货安排 /// /// /// public bool UpdateModel(CY.Model.OA_ShiJuanBiaoQian m_OA_ShiJuanBiaoQian) { try { return _IOA_ShiJuanBiaoQianDAL.UpdateModel(m_OA_ShiJuanBiaoQian); } catch (Exception ex) { throw ex; } } /// /// 获取全部合作客户 /// /// 主键id /// public IEnumerable GetModelList() { Query query = new Query(); return _IOA_ShiJuanBiaoQianDAL.SelectAllModel(query); } /// /// 根据formid获得信息 /// /// 编号 /// public IEnumerable GetModelByformid(Guid formid) { return _IOA_ShiJuanBiaoQianDAL.GetModelByformid(formid); } /// /// 根据ids获得信息 /// /// ids /// public IEnumerable GetModelByids(string ids) { return _IOA_ShiJuanBiaoQianDAL.GetModelByids(ids); } /// /// 获取全部合作客户 /// /// 主键id /// public OA_ShiJuanBiaoQian GetModelByKeyid(Guid? keyid) { return _IOA_ShiJuanBiaoQianDAL.GetModelByKeyid(keyid); } /// /// 删除合作客户 /// /// /// public bool DeleteModel(CY.Model.OA_ShiJuanBiaoQian rType) { try { _IOA_ShiJuanBiaoQianDAL.DeleteModel(rType); } catch (Exception ex) { throw ex; } return true; } /// /// 查询合作客户分页列表 /// /// /// public IEnumerable SelectModelPage(Pagination pa, Guid FirmId, string CreateTimeStart, string CreateTimeEnd, string Bianhao, string Quyu, string Xuexiao, string Nianji, string Kemu ) { string Condition = " and ok.FirmId ='" + FirmId + "' "; if (!string.IsNullOrEmpty(CreateTimeStart)) Condition += " and DATEDIFF(day,ok.[CreateTime],'" + CreateTimeStart + "')<=0 "; if (!string.IsNullOrEmpty(CreateTimeEnd)) Condition += " and DATEDIFF(day,ok.[CreateTime],'" + CreateTimeEnd + "')>=0 "; if (!string.IsNullOrEmpty(Bianhao)) Condition += " and ok.Bianhao like '%" + Bianhao + "%'"; if (!string.IsNullOrEmpty(Quyu)) Condition += " and ok.Quyu like '%" + Quyu + "%'"; if (!string.IsNullOrEmpty(Xuexiao)) Condition += " and ok.Xuexiao like '%" + Xuexiao + "%'"; if (!string.IsNullOrEmpty(Nianji)) Condition += " and ok.Nianji like '%" + Nianji + "%'"; if (!string.IsNullOrEmpty(Kemu)) Condition += " and ok.Kemu like '%" + Kemu + "%'"; Query query = new Query(); IList criterias = new List() { new Criterion("", Condition), new Criterion("orderBy"," CreateTime desc ") }; query.Criteria = criterias; return _IOA_ShiJuanBiaoQianDAL.SelectModelPage(query, pa); } /// /// 根据编号批量删除数据 /// /// 当前操作人 /// 编号集合 /// public bool DeleteDataByIds(string currentOperator, params int[] ids) { return _IOA_ShiJuanBiaoQianDAL.DeleteDataByIds(currentOperator, ids); } } }