Skip to content

Instantly share code, notes, and snippets.

@BosnaZmaj
Last active Jan 16, 2020
Embed
What would you like to do?
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