Beispiel #1
0
 public void DecrementConsignment(int productId, Consignment consignment)
 {
     if (consignment != null)
     {
         consignment.NumberOfContent--;
         dataAccess.EditConsignment(productId, consignment);
     }
 }
Beispiel #2
0
        public void DecrementConsignment(int productId)
        {
            Consignment consignment = GetLatestConsignment(dataAccess.GetProductById(productId));

            if (consignment != null)
            {
                consignment.NumberOfContent--;
                dataAccess.EditConsignment(productId, consignment);
            }
            else
            {
                consignment = new Consignment(0, -1, DateTime.Now);
                dataAccess.AddConsigment(productId, consignment);
            }
        }
Beispiel #3
0
 public void EditConsignment(Product product, Consignment consignment)
 {
     dataAccess.EditConsignment(product.Id, consignment);
 }