public void CreateInventoryRequestOrderForLocation() { var inventoryBase = new AirtableItemLookup(); var test = new Automation(); var component = inventoryBase.GetComponentByName("ZZZ - Dummy", false); var previousQuantity = component.Quantity; var previousPending = component.Pending; test.GenerateInventoryRequestByLocation(component, 3, "James English"); }
public static bool CreateManualInventoryOrder(NameValueCollection fields) { var inventoryBase = new AirtableItemLookup(); var auto = new Automation(); var component = inventoryBase.GetComponentByName(fields["Item Name"], false); if (component != null) { auto.GenerateInventoryRequestByLocation(component, int.Parse(fields["Quantity"]), fields["Destination"]); return(true); } return(false); }
public static bool CreateAutomaticInventoryOrderByLocation(NameValueCollection fields) { var inventoryBase = new AirtableItemLookup(); var auto = new Automation(); var componentID = fields["Component ID"]; var location = fields["Location"]; int.TryParse(fields["Quantity"], out int requestedQuantity); var component = inventoryBase.GetComponentByID(componentID); if (component != null) { auto.GenerateInventoryRequestByLocation(component, requestedQuantity, location); return(true); } return(false); }