示例#1
0
 def search_automobiledevice_byname(automobiledevicename):
     result = None
     try:
         result = DAL_AutoMobileDevice.get_all().filter(
             AName__icontains=automobiledevicename)
     except Exception as ex:
         print(ex)
     return result
示例#2
0
 def search_automobiledevice_byid(automobiledeviceid):
     automobiledevice = None
     try:
         automobiledevice = DAL_AutoMobileDevice.get_all().filter(
             id=automobiledeviceid)
     except Exception as ex:
         SimpleLogger.error(ex.message)
     return automobiledevice
示例#3
0
 def search_automobiledevice(searchkeyword):
     if searchkeyword == "ALL":
         result = DAL_AutoMobileDevice.get_all().filter(MDIsActive=1)
     else:
         result = AutoMobileDeviceService.search_automobiledevice_byid(
             searchkeyword)
         if result == None or len(result) == 0:
             result = AutoMobileDeviceService.search_automobiledevice_byname(
                 searchkeyword.strip())
     return result.order_by("-id")
示例#4
0
 def get_automobiledevice_namelist():
     automobiledevicelist = DAL_AutoMobileDevice.get_all()
     return str([item.TaskName
                 for item in automobiledevicelist]).replace("u'", "'")