Esempio n. 1
0
def add_product_associate():
    insert_dict = {}
    for column in cc.get_columns():
        insert_dict[column] = input(f'{column}: ')
    divider()

    product_associate = cc.add_product_associate(insert_dict)
Esempio n. 2
0
def add_compatibility():
    insert_dict = {}
    for column in cc.get_columns():
        insert_dict[column] = input(f'{column}: ')
    divider()

    compatibility = cc.add_compatibility(insert_dict)
Esempio n. 3
0
def add_storage():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
    divider()

    storage = cc.add_storage(insert_dict)
Esempio n. 4
0
def add_order():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
    divider()

    order = cc.add_order(insert_dict)
Esempio n. 5
0
def add_customer_car():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
    divider()

    customer_car = cc.add_customer_car(insert_dict)
Esempio n. 6
0
def add_employee():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
    divider()

    employee = cc.add_employee(insert_dict)
Esempio n. 7
0
def add_internal_order():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            if column == "lead_time":
                insert_dict[column] = datetime.datetime.now()
            else:
                insert_dict[column] = input(f'{column}: ')
    divider()

    internal_order = cc.add_internal_order(insert_dict)
Esempio n. 8
0
def add_associate():
    insert_dict = {}
    for column in ac.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
            if column == 'contact_person_id':
                contact_person = create_contact_person()
                insert_dict[column] = contact_person.id

    divider()
    associate = ac.add_associate(insert_dict)
    if associate:
        print_tablerow(associate)
Esempio n. 9
0
def add_customer():
    insert_dict = {}
    for column in cc.get_columns():
        if column != "id":
            insert_dict[column] = input(f'{column}: ')
    divider()

    customer = cc.add_customer(insert_dict)
    if customer:
        print_tablerow(customer)
        menu({
            "1": {
                "info": "add car",
                "func": bind_add_customer_car(customer)
            }
        })