Exemplo n.º 1
0
        public void AddInStock(InStock stock)
        {
            PartInWeight tempWeight = new PartInWeight();

            tempWeight.Name   = "Fasto Cap";
            tempWeight.Weight = 100.0f;
            //tempWeight.Parts.Add(new PartWithWeight("Fasto Cap", "Fasto's pen cap", 1.0f));
            //tempWeight.Parts.Add(new PartWithWeight("Fasto Barrel", "Fasto's pen Barrel", 1.0f));
            stock.Add(tempWeight);

            PartInCount tempCount = new PartInCount();

            tempCount.Name  = "Fasto Refill";
            tempCount.Count = 100;
            //tempCount.Parts.Add(new PartWithWeight("Fasto Refill", "Fasto's pen refill", 1));
            stock.Add(tempCount);
        }
Exemplo n.º 2
0
        public void AddInStock(InStock stock)
        {
            PartInWeight tempWeight = new PartInWeight();

            tempWeight.Name   = "Fasto Cap";
            tempWeight.Weight = 100.0f;
            Console.WriteLine("Part coming in Weight: '{0}', Weight: '{1}'", tempWeight.Name, tempWeight.Weight);
            //tempWeight.Parts.Add(new PartWithWeight("Fasto Cap", "Fasto's pen cap", 1.0f));
            //tempWeight.Parts.Add(new PartWithWeight("Fasto Barrel", "Fasto's pen Barrel", 1.0f));
            stock.Add(tempWeight);

            PartInCount tempCount = new PartInCount();

            tempCount.Name  = "Fasto Refill";
            tempCount.Count = 100;
            Console.WriteLine("Part coming in Count: '{0}', Count: '{1}'", tempCount.Name, tempCount.Count);
            //tempCount.Parts.Add(new PartWithWeight("Fasto Refill", "Fasto's pen refill", 1));
            stock.Add(tempCount);
        }
Exemplo n.º 3
0
        public void AddStockInInventory2(Inventory stock)
        {
            PartWithWeight partWithWeight;

            InStock inStock = new InStock();

            partWithWeight = new PartWithWeight("Fasto Cap", "", 4.5f);
            inStock.Add(partWithWeight);

            StoreInventory.AddToInventory(inStock);
        }
Exemplo n.º 4
0
        public void AddStockInInventory(Inventory stock)
        {
            PartWithWeight partWithWeight;
            PartWithCount  partWithCount;

            InStock inStock = new InStock();

            partWithWeight = new PartWithWeight("Fasto Cap", "", 10.0f);
            inStock.Add(partWithWeight);

            partWithWeight = new PartWithWeight("Fasto Barrel", "", 15.0f);
            inStock.Add(partWithWeight);

            partWithWeight = new PartWithWeight("Gripper Cap", "", 5.0f);
            inStock.Add(partWithWeight);

            partWithCount = new PartWithCount("Fasto Refill", "", 1000);
            inStock.Add(partWithCount);
            Console.WriteLine("");
            StoreInventory.AddToInventory(inStock);
        }
Exemplo n.º 5
0
 //adding stock to the instock list any time a movie is returned
 public static void UpdateStockAdd(Movie yourMovie)
 {
     if (!InStock.Contains(yourMovie))
     {
         InStock.Add(yourMovie);
         yourMovie.Copies++;
     }
     else if (yourMovie.Copies == 0)
     {
         OutOfStock.Remove(yourMovie);
         yourMovie.Copies++;
     }
     else
     {
         yourMovie.Copies++;
     }
 }