Skip to content

Instantly share code, notes, and snippets.

@BosnaZmaj
Last active January 16, 2020 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BosnaZmaj/8678987088eb792e45392e0ce63753f3 to your computer and use it in GitHub Desktop.
Save BosnaZmaj/8678987088eb792e45392e0ce63753f3 to your computer and use it in GitHub Desktop.
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