/// <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> /// 创建品牌信息 /// </summary> /// <param name="entity"></param> /// <returns></returns> public virtual BrandInfo CreateBrand(BrandInfo entity) { CheckBrandProcessor.CheckBrandInfo(entity); return(_brandDA.CreateBrand(entity)); }