static public JToken setCommanderInventoryItem(MaterialCommoditiesList list, string name, DateTime dt) { var item = list.FindFD(name); if (item != null) { if (item.category.Equals(MaterialCommodities.CommodityCategory)) { return(setCommanderInventoryCargoItem(item.fdname, item.count, null, dt)); } else { return(setCommanderInventoryMaterialsItem(item.fdname, item.count, dt)); } } else { System.Diagnostics.Debug.WriteLine("Can't find " + name + " in mat db"); return(null); } }