Beispiel #1
0
    def updateEmail(self, n_email):

        if CheckRegistration.validEmail(n_email):
            cursor = self.connection.cursor()

            update = (
                'UPDATE USERR SET email="{}" WHERE username="******";'.format(
                    n_email, self.getUsername()))
            cursor.execute(update)
            self.connection.commit()

        else:
            emailError = UpdateManagerErrors.EmailErrorWindow(
                self.getUsername())
            emailError.show()
            self.close()
Beispiel #2
0
    def updatePhone(self, n_phone):

        if (len(n_phone) == 10 and n_phone.isdigit()):
            store_id = self.getStoreID()
            cursor = self.connection.cursor()

            update = (
                'UPDATE GROCERYSTORE SET phone={} WHERE store_id={};'.format(
                    n_phone, store_id))
            cursor.execute(update)
            self.connection.commit()

        else:
            emailError = UpdateManagerErrors.EmailErrorWindow(
                self.getUsername())
            emailError.show()
            self.close()