示例#1
0
	def __init__(self, opportunityid):
		self.opportunityid = opportunityid
		record = slxdb.get_scalar(sqlstr.get_sqlselect("OPPORTUNITY", "ACCOUNTID", "DESCRIPTION", "TYPE", "ESTIMATEDCLOSE", "NOTES") + sqlstr.sqlstr_sqlwhere("OPPORTUNITY", opportunityid))
		self.accountid = record[0]
		self.description = record[1]
		self.type = record[2]
		self.estimatedclose = record[3]
		self.notes = record[4]
示例#2
0
	def __init__(self, accountid):
		self.accountid = accountid
		
		select = sqlstr.get_sqlselect("ACCOUNT", "ACCOUNT", "TYPE", "STATUS")
		where = sqlstr.sqlstr_sqlwhere("ACCOUNTID", accountid)
		record = slxdb.get_scalar(select + " " + where)
		self.accountname = record[0]
		self.type = record[1]
		self.status = record[2]
示例#3
0
	def __init__(self, ticketnumber):
	
		self.ticketid = ticketnumber
		record = slxdb.get_scalar(sqlstr.get_sqlselect("TICKET", 'ACCOUNTID', 'ASSIGNEDTOID', 'NEEDEDBYDATE', 'STATUSCODE', 'CONTACTID', 'ISSUE', 'NOTES') + sqlstr.get_sqlwhere('ALTERNATEKEYSUFFIX', ticketnumber))
		self.accountid = record[5]
		self.assignedtoid = record[6]
		self.neededbydate = record[7]
		self.statuscode = record[8]
		self.contactid = record[9]
		self.issue = record[10]
		self.notes = record[11]
示例#4
0
	def __init__(self, contactid):
		
		self.contactid = contactid
		select = sqlstr.get_sqlselect("CONTACT", "TYPE", "ACCOUNTID", "ISPRIMARY", "LASTNAME", "FIRSTNAME", "MIDDLENAME", "STATUS", "TITLE", "WORKPHONE", "EMAIL")
		where = sqlstr.sqlstr_sqlwhere("CONTACTID", contactid)
		record = slxdb.get_scalar(select + " " + where)
		
		self.type = record[0]
		self.accountid = record[1]
		self.isprimary = record[2]
		self.lastname = record[3]
		self.firstname = record[4]
		self.middlename = record[5]
		self.status = record[6]
		self.title = record[7]
		self.workphone = record[8]
		self.email = record[9]
示例#5
0
def getRecordCount(table, ID):
	select = sqlstr.get_sqlselect(table, "count (*) as cnt")
	where = ""