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); }
public eItemLocation curLocation(Item item) { return(AllItems.ContainsKey(item) ? AllItems[item] : eItemLocation.shelf); }
public bool HasItem(ReportItem item) { return(AllItems.ContainsKey(item.Key)); }