コード例 #1
0
        public static bool CreateAutomaticInventoryOrder(string componentID)
        {
            var inventoryBase = new AirtableItemLookup();
            var auto          = new Automation();
            var component     = inventoryBase.GetComponentByID(componentID);

            if (component != null)
            {
                auto.GenerateInventoryRequest(component);
                return(true);
            }
            return(false);
        }
コード例 #2
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);
        }