Exemplo n.º 1
0
 public ItemMarket Add(ItemMarket itemMarket)
 {
     // Check to see if the ItemMarket already exists in collection
     // and add if not yet added.
     ItemMarket mkt = elements.Find(x => x.ItemClass == itemMarket.ItemClass &&
                                  x.Vendor == itemMarket.Vendor &&
                                  x.Style == itemMarket.Style &&
                                  x.Colour == itemMarket.Colour &&
                                  x.Size == itemMarket.Size &&
                                  x.MarketCode == itemMarket.MarketCode);
     if (mkt == null)
     {
         mkt = itemMarket;
         elements.Add(mkt);
     }
     return mkt;
 }
Exemplo n.º 2
0
 public void Remove(ItemMarket itemMarket)
 {
     elements.Remove(itemMarket);
 }
Exemplo n.º 3
0
        public ItemMarket Add(int division, int department, int itemClass, int vendor,
            int style, int colour, int size, string marketCode)
        {
            // Check to see if the ItemMarket already exists in collection
            // and add if not yet added.
            ItemMarket mkt = elements.Find(x => x.ItemClass == itemClass &&
                                         x.Vendor == vendor &&
                                         x.Style == style &&
                                         x.Colour == colour &&
                                         x.Size == size &&
                                         x.MarketCode == marketCode);
            if (mkt == null)
            {
                mkt = new ItemMarket();
                mkt.Division = division;
                mkt.Department = department;
                mkt.ItemClass = itemClass;
                mkt.Vendor = vendor;
                mkt.Style = style;
                mkt.Colour = colour;
                mkt.Size = size;
                mkt.MarketCode = marketCode;

                elements.Add(mkt);
            }
            return mkt;
        }