Question: After the data appears, be sure to click either the blue icon or else the icon with the check mark to save the added data.
After the data appears, be sure to click either the blue icon or else the icon with the check mark to save the added data. No use doing this twice When done... The Program Assignment Study examples and watch any associated videos before starting this program; it will save you time in the long run. Your program reads table data from the database into a wxListCtrl. Your interface will need a wx Frame and a wx ListCtrl and buttons. A display button loads all of the film data into the list control. The Insert Film button will open a wx Dialog that allows the user to enter the data items used for a single record. When the user closes the dialog, the new record will be SQL INSERTED to the afilms table and the list control repopulated so as to display the inserted record. You also need a close button to close the program. A possible interface might look like this. As we said, clicking the Insert Film button should open a dialog box that allows adding a new record to the table. Since the filmid is autoinctementing, you dont need to add that yourself. Also, remember the language, year, and length are integers, and the rate is a double has a decimal point Do not try to enter a string for these fields. You do not necessarily need to have the dialog widgets in columns as shown, a single column would work just as well. After entering data for a new record, clicking the OK button in the dialog box should insert the record into the tickets table. Your code should then repopulate the list control so as to include the new record. Make up any data that seems reasonable for your new entry. Here's what you need to do to get on this one. Create a sqlite database named movies.db and create a table named afilms with the field names spelled exactly like those given in the CSV file. I recommend using the SQliteStudio, but you may use whatever program or method you want. There is a video on using Sqlite Studio in the lecture notes. You'll need to import the CSV file into SqliteStudio or whatever to generate the database. Your program must work with my database. So you will need to be careful to name everything the same as specified above and use the same datatypes. For simplicity, as you write your program keep your database file in the same folder as your program so that we don't have any path issues. Import the CSV file into the afilms table with the exact field names as given in the file. You should have ish records initially. Your program should properly connect to the database you created using techniques from the lecture notes. the id field should be an integer autoincrementing primary key. Rentalrate is of type dbouble, language, releaseyear and length should all be integers. Rating and title should be of type TEXT. The Display button should load the whole table into the list control. the Insert Citation button should open a custom dialog. You may use any layout method you want.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
