Exemple #1
0
        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");
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }