コード例 #1
0
 def accept_result():
     DbManager.modify_ride_distribution(self, ride_id[0],
                                        "accept", drivername)
     individual_ride_window.destroy()
     ride_details = DbManager.fetch_ride_details(
         self, ride_id[0])
     user_phone_number = DbManager.fetch_user_phone_no(
         self, ride_details[5])
     Ride_acceptance_window.accepted_ride_window(
         self, ride_details, user_phone_number)
コード例 #2
0
        def verify_customer():

            ride_id_to_verify_customer = DbManager.get_ride_id_to_verify_customer(
                self, username)

            if (ride_id_to_verify_customer == 0):
                ride_id_to_verify_customer_status = DbManager.fetch_ride_status_verification(
                    self, username)
                if (ride_id_to_verify_customer_status == 0
                        or ride_id_to_verify_customer_status[0][0]
                        == "COMPLETED"):
                    alert.showinfo("Info", "No rides accepted to verify!")
                elif (ride_id_to_verify_customer_status[0][0] == "RUNNING"):
                    alert.showinfo("Info", "You are already running a ride!")

            else:
                ride_details = DbManager.fetch_ride_details(
                    self, ride_id_to_verify_customer[0][0])
                user_Details = DbManager.fetch_user_details(
                    self, ride_details[5])
                driver_window.withdraw()
                Ride_acceptance_window.verify_customer_window(
                    self, ride_details, user_Details, driver_window)