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.OA { public class OA_IntentionCustomerBLL { IOA_IntentionCustomerDAL intentionCustomerDAL = null; public OA_IntentionCustomerBLL() { intentionCustomerDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_IntentionCustomerDAL) as IOA_IntentionCustomerDAL; } /// /// 获取最大的CustomerId /// /// /// public int? getMaxCustomerId(Guid FirmId) { if (intentionCustomerDAL.getMaxCustomerIdModel(FirmId) == null) { return 0; } else { return intentionCustomerDAL.getMaxCustomerIdModel(FirmId).CustomerId; } } /// /// 插入单个意向公司 /// /// /// public bool InsertModel(OA_IntentionCustomer model) { return intentionCustomerDAL.InserModel(model); } /// /// 返回所有意向客户 /// /// /// public IEnumerable getAllIntentionCustomer(Guid FirmId) { return intentionCustomerDAL.getAllIntentionCustomer(FirmId); } /// /// 根据keyid获取单个意向客户 /// /// /// public OA_IntentionCustomer getSingleIntentionCustomer(string Keyid) { return intentionCustomerDAL.getSingleIntentionCustomer(Keyid); } /// /// 更新一个意向客户 /// /// /// public bool UpdateModel(OA_IntentionCustomer model) { return intentionCustomerDAL.UpdateModel(model); } /// /// 删除一个意向客户 /// /// /// public bool DeleteModel(OA_IntentionCustomer model) { return intentionCustomerDAL.DeleteModel(model); } /// /// 判断是否CompanyName 是否存在 /// /// /// public bool isExistCompanyName(String CompanyName, Guid FirmId, int ID) { return intentionCustomerDAL.isExistCompanyName(CompanyName, FirmId, ID); } public IEnumerable getAllIntentionCustomer(Pagination pa, Guid FirmId, string CompanyName, DateTime? beginTime, DateTime? endTime, string SourcesInfoId, string CustomerIndustriesId, string AccountManagerId, string BusinessManagerId, string CustomerTypeId, string TurnoverIntentionId, string CustomerStatusId, string DegreeImportanId, string Province, string City, string County) { return intentionCustomerDAL.getAllIntentionCustomer(pa, FirmId, CompanyName, beginTime, endTime, SourcesInfoId, CustomerIndustriesId, AccountManagerId, BusinessManagerId, CustomerTypeId, TurnoverIntentionId, CustomerStatusId, DegreeImportanId, Province, City, County); } /// /// 模糊查询公司名称 /// /// /// /// public IEnumerable SelectListByName(String CompanyName, Guid FirmId) { return intentionCustomerDAL.SelectListByName(CompanyName, FirmId); } /// /// 返回意向客户访问记录 /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// public IEnumerable getAllIntentionCustomerList(Pagination pa, Guid FirmId, string CompanyName, DateTime? beginTime, DateTime? endTime, string SourcesInfoId, string CustomerIndustriesId, string AccountManagerId, string BusinessManagerId, string CustomerTypeId, string TurnoverIntentionId, string CustomerStatusId, string DegreeImportanId, string Province, string City, string County, string selNupdoor, string Nupdoor, string selNphone, string Nphone, string selNqq, string Nqq, string selNmessage, string Nmessage, string selNemial, string Nemial, string selNDirectMail, string NDirectMail, string selNall, string Nall) { return intentionCustomerDAL.getAllIntentionCustomerList(pa, FirmId, CompanyName, beginTime, endTime, SourcesInfoId, CustomerIndustriesId, AccountManagerId, BusinessManagerId, CustomerTypeId, TurnoverIntentionId, CustomerStatusId, DegreeImportanId, Province, City, County, selNupdoor, Nupdoor, selNphone, Nphone, selNqq, Nqq, selNmessage, Nmessage, selNemial, Nemial, selNDirectMail, NDirectMail, selNall, Nall); } /// /// 根据客户编号获取客户 /// /// 客户编号 /// public IEnumerable SelectListListByCustomId(string Keyid, Guid MemberId) { return intentionCustomerDAL.SelectListListByCustomId(Keyid, MemberId); } } }