def get_object_list(page, search_filter, search=None):
     nonlocal items_per_page
     nonlocal max_pages
     print("REE:",object_id)
     number_of_objects = LL_API.get_number_of_objects(Object_Branch_UI.object_id, search)
     max_pages = math.ceil(number_of_objects / items_per_page)
     return LL_API.get_object_list(page, search_filter, search, items_per_page)
        def confirm_object():
            nonlocal edited_info
            nonlocal new_object
            new_object = object(edited_info[0][1],
                                    edited_info[1][1],
                                    edited_info[2][1],
                                    edited_info[3][1],
                                    edited_info[4][1],
                                    edited_info[5][1],
                                    edited_info[6][1],
                                    flight_history=[])

            # Making sure python creates a new list
            all_object_list = [] + LL_API.get_object_list()

            # Finding object in that list and replacing it
            for i, object_i in enumerate(all_object_list):
                if object_i == object:
                    all_object_list[i] = new_object

            # Writing new list
            LL_API.write_object_list(all_object_list)

            # Killing function
            nonlocal running
            running = False
Ejemplo n.º 3
0
        def confirm_employee():
            nonlocal edited_info
            nonlocal new_employee
            new_employee = Employee(edited_info[0][1],
                                    edited_info[1][1],
                                    edited_info[2][1],
                                    edited_info[3][1],
                                    edited_info[4][1],
                                    edited_info[5][1],
                                    edited_info[6][1],
                                    flight_history=[])

            # Making sure python creates a new list
            all_employee_list = [] + LL_API.get_employee_list()

            # Finding employee in that list and replacing it
            for i, employee_i in enumerate(all_employee_list):
                if employee_i == employee:
                    all_employee_list[i] = new_employee

            # Writing new list
            LL_API.write_employee_list(all_employee_list)

            # Killing function
            nonlocal running
            running = False
Ejemplo n.º 4
0
 def get_employee_list(page, search_filter, search=None):
     nonlocal items_per_page
     nonlocal max_pages
     max_pages = math.ceil(
         LL_API.get_number_of_employees(search_filter, search) /
         items_per_page)
     return LL_API.get_employee_list(page, search_filter, search,
                                     items_per_page)
 def confirm_object():
     nonlocal new_object_data
     # Turning the string list back to object object
     new_object = [object(new_object_data[0][1],
                              new_object_data[1][1],
                              new_object_data[2][1],
                              new_object_data[3][1],
                              new_object_data[4][1],
                              new_object_data[5][1],
                              new_object_data[6][1],
                              flight_history=[])]
     LL_API.append_object_list(new_object)
     nonlocal running
     running = False
Ejemplo n.º 6
0
 def confirm_employee():
     nonlocal new_employee_data
     # Turning the string list back to employee object
     new_employee = [
         Employee(new_employee_data[0][1],
                  new_employee_data[1][1],
                  new_employee_data[2][1],
                  new_employee_data[3][1],
                  new_employee_data[4][1],
                  new_employee_data[5][1],
                  new_employee_data[6][1],
                  flight_history=[])
     ]
     LL_API.append_employee_list(new_employee)
     nonlocal running
     running = False