/// <summary> /// 修改品牌信息 /// </summary> /// <param name="entity"></param> /// <returns></returns> public virtual BrandInfo UpdateBrand(BrandInfo entity) { if (entity != null) { CheckBrandProcessor.CheckBrandSysNo(entity.SysNo); } CheckBrandProcessor.CheckBrandInfo(entity); using (TransactionScope scope = new TransactionScope()) { entity = _brandDA.UpdateBrand(entity); if (entity.Status == ValidStatus.DeActive) { ObjectFactory <IProductLineDA> .Instance.DeleteByBrand(entity.SysNo.Value); } scope.Complete(); } return(entity); }
/// <summary> /// 根据SysNo获取品牌信息 /// </summary> /// <param name="brandSysNo"></param> /// <returns></returns> public virtual BrandInfo GetBrandInfoBySysNo(int brandSysNo) { CheckBrandProcessor.CheckBrandSysNo(brandSysNo); return(_brandDA.GetBrandInfoBySysNo(brandSysNo)); }