Ejemplo n.º 1
0
 /// <summary>
 /// 更新生产商信息
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public virtual ManufacturerInfo UpdateManufacturer(ManufacturerInfo entity)
 {
     if (entity != null)
     {
         CheckManufacturerProcessor.CheckManufacturerSysNo(entity.SysNo);
     }
     CheckManufacturerProcessor.CheckManufacturerInfo(entity);
     using (TransactionScope scope = new TransactionScope())
     {
         entity = _manufacturerDA.UpdateManufacturer(entity);
         if (entity.Status == ManufacturerStatus.DeActive)
         {
             ObjectFactory <IProductLineDA> .Instance.DeleteByManufacturer(entity.SysNo.Value);
         }
         scope.Complete();
     }
     return(entity);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 创建生产商信息
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public virtual ManufacturerInfo CreateManufacturer(ManufacturerInfo entity)
 {
     CheckManufacturerProcessor.CheckManufacturerInfo(entity);
     return(_manufacturerDA.CreateManufacturer(entity));
 }