Python Project: Properties Maintenance System P11
Subject: Writing a Full Application for Properties Maintenance System [Show Maintenance Request]
Learning : Python, Math, SQL, Logeic
[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]
In this part we will continue write the Functions in Maintenance Request Service. Here we will write the Function to Show Maintenance Request.
Show all Request In this Function we will display all the Properties we have in the system, then the user will Select the ID of the Property, after that we will display all Maintenance Jobs that we have in the system (Maintenance for); again the user need the Select the Job ID and if the required job is not in the list the user need to go-back and add it to the system first. After that the user will Select current Job-Status [also if not in the system we need to add it], then entering the Date of starting the Maintenance, finally the user can write any Notes or just press enter to save the request. With any question above the user can Exit the function by interning [E].
Here are some code sample..
Table header
print(‘ ‘*6,’ID’,’ ‘*3,’Property ID’,’ ‘*5,’Maintenance Date’,’ ‘,’Maintenance For’,’ ‘*7,’Job Status’,’ ‘*12,’Note’)
print(‘ ‘*4,’-‘*120)
Code to fetch-all data in the Maintenance Request Table.
c.execute (“select * from maint_request_t “)
dataset = c.fetchall()
To Get the Property Type, we call our get_lookup_values Function..
prop_type_id = get_lookup_values(‘properties_t’,’p_id’,dataset[each][1])
p_type_name = get_lookup_values(‘prop_type_t’,’pt_id’,prop_type_id[0][2])
To save the time, all the code is available in the Download Page.
:: PMS Parts ::
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 |
Part 8 | Part 9 | Part 10 | Part 11 | Part 12 | Part 13 | Part 14 |
..:: Have Fun with Coding ::.. 🙂
To Download my Python code (.py) files Click-Here
By: Ali Radwani
-
February 27, 2022 at 7:13 amPython Project: Properties Maintenance System P12 | Ali's Photography Space...