public static bool IsItemNameValid(string name, out string error)
        {
            bool result = true;

            error = "";

            if (string.IsNullOrEmpty(name))
            {
                error  = "Item name is invalid.";
                result = false;
            }
            else if (AllItems.ContainsKey(name))
            {
                error  = "Item name already exists.";
                result = false;
            }

            return(result);
        }
Example #2
0
 public eItemLocation curLocation(Item item)
 {
     return(AllItems.ContainsKey(item) ? AllItems[item] : eItemLocation.shelf);
 }
Example #3
0
 public bool HasItem(ReportItem item)
 {
     return(AllItems.ContainsKey(item.Key));
 }