def populateInventoryInfo(): print(sys._getframe().f_code.co_name + ": ") dao = InventoryDAO(gc_connector) entries = [ (1, 0, 0, 50, 0, 0), (2, 0, 1, 50, 20, 0), (3, 0, 2, 50, 40, 0), (4, 0, 3, 50, 60, 0), (5, 1, 0, 100, 0, 0), (1, 1, 1, 100, 20, 0), (2, 2, 0, 150, 0, 0), (3, 2, 1, 150, 20, 0), (4, 2, 2, 150, 40, 0), (5, 2, 3, 150, 60, 0), (1, 2, 4, 150, 80, 0), (2, 2, 5, 150, 100, 0) ] for entry in entries: dao.createAnEntry(entry) print(dao.selectAllEntries()) print("===================================================") print("Testing populateInventoryInfo-------------------complete\n\n\n")
def depositInventory(self, barcode, x_index, y_index, x_encoder, y_encoder): dbConnect = DbConnect(InventoryDAO.getDbDir()) connector = dbConnect.getConnection() barcodeDAO = BarcodeDAO(connector) barcodeId = barcodeDAO.getPriKeys("Barcode", barcode)[0] inventoryDAO = InventoryDAO(connector) entry = (barcodeId, x_index, y_index, x_encoder, y_encoder, 0) inventoryDAO.createAnEntry(entry)
def populateInventoryInfo(): print(sys._getframe().f_code.co_name + ": ") dao = InventoryDAO(gc_connector) entries = [ ] for entry in entries: dao.createAnEntry(entry) print(dao.selectAllEntries()) print("===================================================") print("Testing populateInventoryInfo-------------------complete\n\n\n")