using System; using System.Collections.Generic; using System.Linq; using System.Text; using CY.IDAL.Inquiry; using AbstractFactory; using CY.Model; using CY.Infrastructure.Query; using CY.IDAL; using CY.IBaseDAL; using CY.Infrastructure; namespace CY.BLL.Inquiry { /// /// 品牌相关业务逻辑类 /// public class BrandInfoBLL { IBrandInfoDAL _iBrandInfoDAL = null; public BrandInfoBLL() { _iBrandInfoDAL = Factory.GetDALByInterfaceName(DALInterface.IBrandInfoDAL) as IBrandInfoDAL; } /// /// 新增品牌 /// /// /// public bool InsertBrand(SysInquiry_BrandInfo model, SysInquiry_BrandListByPaper brandPaper, SysInquiry_PaperInfo paperModel) { return _iBrandInfoDAL.InsertBrandModel(model, brandPaper, paperModel); } /// /// 修改品牌 /// /// /// public bool UpdateBrand(SysInquiry_BrandInfo model,SysInquiry_BrandListByPaper brandPaper, SysInquiry_PaperInfo paperModel,SysInquiry_PaperInfo orPaperModel) { return _iBrandInfoDAL.UpdateBrandModel(model,brandPaper,paperModel,orPaperModel); } /// /// 删除品牌 /// /// /// public bool DeleteBrand(SysInquiry_BrandInfo model) { return _iBrandInfoDAL.UpdateModel(model); } /// /// 分页获取品牌列表 /// /// 品牌名称 /// 分页参数 /// public IEnumerable GetBrandListByPaging(int paperTypeId, int paperId, string brandName, int status, Pagination pa) { return _iBrandInfoDAL.SelectModelPage(paperTypeId,paperId, brandName, status, pa); } /// /// 根据主键获取品牌实体 /// /// /// public SysInquiry_BrandInfo SelectModelByKey(int key) { return _iBrandInfoDAL.SelectModelByKey(key); } /// /// 判断是否有相同的品牌名称 /// /// /// public bool IsExistsBrandName(string brandName, int PaperId) { return _iBrandInfoDAL.IsExistsBrandName(brandName, PaperId); } /// /// 批量删除品牌 /// /// /// public bool DeleteBrandInfoList(List keyIds) { return _iBrandInfoDAL.DeleteBrandInfoList(keyIds); } /// /// 返回所有有效的品牌列表 /// /// public IEnumerable GetBrandList() { return _iBrandInfoDAL.GetBrandList(); } /// /// 获取最新排序顺序 /// /// public int GetOrderNumByMax(int paperId) { return _iBrandInfoDAL.GetOrderNumByMax(paperId); } } }