mirror of
https://github.com/ada-dmitry/oop_ada.git
synced 2026-09-24 00:00:21 +00:00
added TS
This commit is contained in:
+3
-14
@@ -70,16 +70,16 @@ class doctor:
|
||||
finally:
|
||||
self.db.close(conn, cur)
|
||||
|
||||
def workload_check(self, time_of_appoint): #как сделать?
|
||||
def workload_check(self, time_of_appoint):
|
||||
conn = None
|
||||
cur = None
|
||||
try:
|
||||
conn = self.db.connect()
|
||||
cur = conn.cursor()
|
||||
if (self.time_of_appoint == time_of_appoint):
|
||||
cur.execute("UPDATE loan_applications SET status = %s WHERE application_id = %s", ('approved', timetable.applicationID))
|
||||
cur.execute("UPDATE SET status = %s WHERE application_id = %s", ('approved', time_of_appoint.applicationID))
|
||||
else:
|
||||
cur.execute("UPDATE loan_applications SET status = %s WHERE application_id = %s", ('rejected', timetable.applicationID))
|
||||
cur.execute("UPDATE SET status = %s WHERE application_id = %s", ('rejected', time_of_appoint.applicationID))
|
||||
conn.commit()
|
||||
finally:
|
||||
self.db.close(conn, cur)
|
||||
@@ -99,17 +99,6 @@ class DocAppointment:
|
||||
self.time_of_appoint
|
||||
self.db = db
|
||||
|
||||
# def addToDatabase(self):
|
||||
# conn = None
|
||||
# cur = None
|
||||
# try:
|
||||
# conn = self.database.connect()
|
||||
# cur = conn.cursor()
|
||||
# cur.execute("INSERT INTO appointment (client_id, loan_amount, status) VALUES (%s, %s, %s)", (self.client.clientID, self.loanAmount, self.status))
|
||||
# conn.commit()
|
||||
# finally:
|
||||
# self.database.close(conn, cur)
|
||||
|
||||
def del_appoint(self):
|
||||
conn = None
|
||||
cur = None
|
||||
|
||||
Reference in New Issue
Block a user