Exemple #1
0
        def add_project_to_db(entry_list):
            # take all the details from the page and add a new prject, make sure to check that the input is valid
            # and that the project does not exsist
            #get the info from the boxes, pass it to the project method

            new_project = Projects(
                entry_list['Customer ID'].get(),
                entry_list['Project Name'].get(),
                entry_list['Project Reference'].get(),
                entry_list['Project Address'].get(),
                entry_list['Project Postcode'].get(),
                entry_list['Primary Contact'].get(),
                entry_list['Project Type'].get(),
                entry_list['Project Price Approx'].get(),
                '',
                entry_list['Project Expected Profit'].get(),
                '',
                entry_list['Project Triage'].get(),
                entry_list['Project Lead MES'].get(),
                '',
                '',
            )
            # print(new_project)
            new_project.save_to_db()