示例#1
0
 def dm_updateautomobiledevice(request):
     message = "successful"
     try:
         automobiledevice = DAL_AutoMobileDevice.get_automobiledevice(
             request.POST["automobiledeviceid"])
         automobiledevice = AutoMobileDeviceService.initlize_dm_instance(
             request, automobiledevice)
         DAL_AutoMobileDevice.add_automobiledevice(automobiledevice)
     except Exception as ex:
         message = str(ex)
         SimpleLogger.error(message)
     return message
示例#2
0
    def disable_automobiledevice(request):

        message = "successful"
        try:
            automobiledevice = DAL_AutoMobileDevice.get_automobiledevice(
                request.POST["automobiledeviceid"])
            automobiledevice.TaskIsActive = 0
            DAL_AutoMobileDevice.add_automobiledevice(automobiledevice)
        except Exception as ex:
            message = str(ex)
            SimpleLogger.error(message)
        return message
示例#3
0
 def dm_createautomobiledevice(request):
     ''' create new  db model automobiledevice
     '''
     message = "successful"
     try:
         automobiledevice = AutoMobileDevice()
         automobiledevice = AutoMobileDeviceService.initlize_dm_instance(
             request, automobiledevice)
         DAL_AutoMobileDevice.add_automobiledevice(automobiledevice)
     except Exception as ex:
         message = str(ex)
         SimpleLogger.error(message)
     return message
示例#4
0
 def copy_automobiledevice(request):
     message = "successful"
     try:
         from_automobiledevice = DAL_AutoMobileDevice.get_automobiledevice(
             request.POST["automobiledeviceid"])
         to_automobiledevice = AutoMobileDevice()
         to_automobiledevice.AName = from_automobiledevice.AName
         to_automobiledevice.AOS = from_automobiledevice.AOS
         to_automobiledevice.AIP = from_automobiledevice.AIP
         to_automobiledevice.AStatus = 1
         to_automobiledevice.AAgentBrowser = from_automobiledevice.AAgentBrowser
         to_automobiledevice.AIsReserved = from_automobiledevice.AIsReserved
         DAL_AutoMobileDevice.add_automobiledevice(to_automobiledevice)
     except Exception as ex:
         message = str(ex)
         SimpleLogger.error(message)
     return message