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
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
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
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