Ejemplo n.º 1
0
 public void AddJewelry()
 {
     Jewelries.Add(SomeJewelry);
     GetCollections();
     if ((JewelryType.Count > 0 && SomeJewelry.Type.NameOfJewerly == JewelryType[0].Type.NameOfJewerly) ||
         JewelryType.Equals(Jewelries))
     {
         JewelryType.Add(SomeJewelry);
     }
 }
Ejemplo n.º 2
0
        public void RedactJewelry()
        {
            Jewelry jewelry = new Jewelry();

            jewelry = SomeJewelry;
            RemoveJewelry();
            Jewelries.Add(jewelry);
            GetCollections();
            if ((JewelryType.Count > 0 && jewelry.Type.NameOfJewerly == JewelryType[0].Type.NameOfJewerly) ||
                JewelryType.Equals(Jewelries))
            {
                JewelryType.Add(SomeJewelry);
            }
        }
        public void addItem(JewelryItemsViewModel item)
        {
            Jewelries.Add(item);
            if (Categories.Where(x => x.Id == item.JewelryCategories.Id).Count() == 0)
            {
                Categories.Add(item.JewelryCategories);
                Weight.Add(item.JewelryCategories.Name, 0);
                Price.Add(item.JewelryCategories.Name, 0);
                Quantity.Add(item.JewelryCategories.Name, 0);
            }
            Weight[item.JewelryCategories.Name]   += item.Weight.Value * item.Quantity;
            Price[item.JewelryCategories.Name]    += item.Price.Value * item.Quantity;
            Quantity[item.JewelryCategories.Name] += item.Quantity;

            Weight["Total"]   += item.Weight.Value * item.Quantity;
            Price["Total"]    += item.Price.Value * item.Quantity;
            Quantity["Total"] += item.Quantity;
        }