示例#1
0
 void AddSKUItem(string key, int index)
 {
     if (!string.IsNullOrEmpty(key))
     {
         key = key.ToUpperInvariant();
         if (!SKUDictionary.ContainsKey(key))
         {
             SKUDictionary.Add(key, index);
         }
     }
 }
示例#2
0
        public List <ActiveInventoryObject> GetByUPCorSKU(string key)
        {
            List <ActiveInventoryObject> retVal = new List <ActiveInventoryObject>();

            if (key != null)
            {
                key = key.ToUpperInvariant();
                if (UPCDictionary.ContainsKey(key))
                {
                    retVal.Add(Items[UPCDictionary[key]]);
                }
                if (SKUDictionary.ContainsKey(key))
                {
                    retVal.Add(Items[SKUDictionary[key]]);
                }
            }
            return(retVal);
        }