-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForestview_DataEntry.py
80 lines (76 loc) · 2.42 KB
/
Forestview_DataEntry.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#Revision #1 Ian Siple 2/02/2023
#Begin Ian Siple 3/02/2023
class Forestview_DataEntry:
def __init__(self, dataEntry):
try:
self.dataEntry = dataEntry
except:
print("Invalid Data Entry... ERROR RETRIEVING DATA")
def reverse_data_entry(self):
try:
self.dataEntry.reverse()
except:
return "Invalid Data Entry... ERROR REVERSING DATA ENTRY"
def return_data_entry(self):
try:
return self.dataEntry
except:
return "Invalid Data Entry... ERROR RETURNING DATA ENTRY"
def print_data_entry(self):
print(self.dataEntry)
def get_order_id(self):
try:
return self.dataEntry[0]
except:
return "Invalid Data Entry... ERROR RETRIEVING ORDER ID"
def get_customer_id(self):
try:
return self.dataEntry[1]
except:
return "Invalid Data Entry... ERROR RETRIEVING CUSTOMER ID"
def get_employee_id(self):
try:
return self.dataEntry[2]
except:
return "Invalid Data Entry... ERROR RETRIEVING EMPLOYEE ID"
def get_order_date(self):
try:
return self.dataEntry[3]
except:
return "Invalid Data Entry... ERROR RETRIEVING ORDER DATE"
def get_required_date(self):
try:
return self.dataEntry[4]
except:
return "Invalid Data Entry... ERROR RETRIEVING REQUIRED DATE"
def get_shipped_date(self):
try:
return self.dataEntry[5]
except:
return "Invalid Data Entry... ERROR RETRIEVING SHIPPED DATE"
def get_ship_via(self):
try:
ship_via = self.dataEntry[6]
if ship_via == '1':
return "Truck"
if ship_via == '2':
return "Plane"
if ship_via == '3':
return "UPS"
else:
return "Cargo Ship"
except:
return "Invalid Data Entry... ERROR RETRIEVING SHIP VIA"
def get_freight(self):
try:
return self.dataEntry[7]
except:
return "Invalid Data Entry... ERROR RETRIEVING FREIGHT"
def get_ship_name(self):
try:
return self.dataEntry[8]
except:
return "Invalid Data Entry... ERROR RETRIEVING SHIP NAME"
#revision 1 3/02/2023
#End Ian Siple 3/02/2023
#Group 1/Project #1