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); }
public BoolResult AddManyProductToSocet(Data.Dto.Product product, Data.Dto.WarehouseSocet socet, int count) { var result = new BoolResult(); var list = new List <SocetProducts>(); for (int i = 0; i < count; i++) { list.Add(new SocetProducts(product, socet)); } result = warehouseSocetRepository.UpdateUseVolumeAndWeight(socet.Id, product.Weight * count, product.Volume * count); if (result.Succes) { result = socetProductRepository.Add(list); } return(result); }
public BoolResult GetManyProductFromSocet(Data.Dto.Product product, Data.Dto.WarehouseSocet socet, int count) { throw new NotImplementedException(); }
public BoolResult UpdateProduct(Data.Dto.Product product) { return(productRepository.Update(product)); }
public BoolResult AddProduct(Data.Dto.Product product) { return(productRepository.Add(product)); }
public static BoolResult GetManyProductTFromSocet(Data.Dto.Product product, Data.Dto.WarehouseSocet socet, int count) { return(ServiceManager.Call <SocetProductsClient, BoolResult>(c => c.GetManyProductFromSocet(product, socet, count))); }
public static BoolResult AddProductToSocet(Data.Dto.Product product, Data.Dto.WarehouseSocet socet) { return(ServiceManager.Call <SocetProductsClient, BoolResult>(c => c.AddProductToSocet(product, socet))); }