コード例 #1
0
 void AddUPCItem(string key, int index)
 {
     if (!string.IsNullOrEmpty(key))
     {
         key = key.ToUpperInvariant();
         if (!UPCDictionary.ContainsKey(key))
         {
             UPCDictionary.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);
        }