コード例 #1
0
def run():
    option = menu()
    if option == 1:
        database.display_products_with_stock_levels()
    elif option == 2:
        database.display_product_supplier()
    elif option == 3:
        database.display_product_supplier_locations()
    elif option == 4:
        database.display_products_missing_suppliers()
    elif option == 5:
        database.display_suppliers_missing_products()
    elif option == 6:
        database.display_missing_data()
    else:
        print("Invalid selection")
コード例 #2
0
def menu():
    print("Please select one of the following options:")
    print("[1] Display stock levels")
    print("[2] Display suppliers")
    print("[3] Display supplier locations")
    print("[4] Display missing suppliers")
    print("[5] Display missing products")
    print()
    userSelection = int(input("Your selection: "))
    if userSelection == 1:
        database.display_products_with_stock_levels()
    elif userSelection == 2:
        database.display_product_supplier()
    elif userSelection == 3:
        database.display_product_supplier_locations()
    elif userSelection == 4:
        database.display_products_missing_suppliers()
    elif userSelection == 5:
        database.display_suppliers_missing_products()
コード例 #3
0
ファイル: main.py プロジェクト: poojakhullar0107/com728
def menu():
    print("Please select one of the following options:")
    print("[1] Display stock levels")
    print("[2] Display Supplier")
    print("[3] Display Supplier locations")
    print("[4] Display Missing Supplier")
    print("[5] Display missing products")
    print("[6] Display missing data")

    choice = int(input(" Your Choice : "))
    if choice == 1:
        database.display_products_with_stock_levels()
    elif choice == 2:
        database.display_product_supplier()
    elif choice == 3:
        database.display_product_supplier_locations()
    elif choice == 4:
        database.display_products_missing_suppliers()
    elif choice == 5:
        database.display_suppliers_missing_products()
    elif choice == 6:
        database.display_missing_data()
    else:
        print("invalid choice.. Bye")