Last active
January 16, 2020 14:02
-
-
Save BosnaZmaj/8678987088eb792e45392e0ce63753f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Helper: | |
encoding = 'utf-8' | |
def __init__(self, udid, it_pro): | |
self.udid = udid | |
self.itpro = it_pro | |
def employee_id(self): | |
sql = "select emplid from emplid_to_alphaname where alphaname = (%s);", (self.udid, ) | |
result = DatabaseConnection.netdb(sql) | |
if result is None: | |
sys.exit("The alphaname {} did not return an associated Employee Number. Check that the alphaname is " | |
"correct " | |
"or {} may not have an Employee Number assigned yet.".format(self.udid, self.udid)) | |
emplid = int(result[0]) | |
return emplid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment