示例#1
0
 public BoolResult AddProductToSocet(Data.Dto.Product product, Data.Dto.WarehouseSocet socet)
 {
     var result = new BoolResult();
     var socetProducts = new SocetProducts(product, socet);
     result = warehouseSocetRepository.UpdateUseVolumeAndWeight(socet.Id, product.Weight, product.Volume);
     if (result.Succes)
     {
         result = socetProductRepository.Add(socetProducts);
     }
     return result;
 }
示例#2
0
 public BoolResult AddProductIdToSocetId(string productId, string socetId)
 {
     var result = new BoolResult();
     var socetProducts = new SocetProducts(productId, socetId);
     var product = productRepository.GetById(productId);
     result = warehouseSocetRepository.UpdateUseVolumeAndWeight(socetId, product.Weight, product.Volume);
     if (result.Succes)
     {
         result = socetProductRepository.Add(socetProducts);
     }
     return result;
 }