def __init__(self, table="object", **kkw): Record.__init__(self, **kkw) self.setTable(table) self._new = True self._flags = None self._params = None self._events = None self._notes = None
def __init__(self, table="object", **kkw): Record.__init__(self, **kkw) self.setTable ( table ) self._new = True self._flags = None self._params = None self._events = None self._notes = None
def _param_set(self, paramname, paramval): if self._param_get(paramname): if paramval is None: self._param_del(paramname) else: oldParam = Record.ID(self._params_id[paramname.upper()]) oldParam.content = paramval oldParam.write() self.update() elif paramval is not None: newParam = Record.EMPTY("object_parameter") newParam.refobjectid = self._object.objectid newParam.parametername = paramname.upper() newParam.content = paramval newParam.write() self.update()
def _flag_add(self, flagname): if not self._flag_isset(flagname): newFlag = Record.EMPTY("object_flag") newFlag.refobjectid = self._object.objectid newFlag.flagname = flagname.upper() newFlag.write() self.update()
def __init__(self, field, parent, *args, **kwargs): mwx.StaticText.__init__(self, parent, style=wx.CB_READONLY, name=field.path) BaseReferenceEditor.__init__(self, field, getrecords=False, **kwargs) from ProvCon.dbui.orm import Record self.referenced_record = Record.EMPTY(field.reference.name)
def _param_del(self, paramname): if self._param_get(paramname): oldParam = Record.ID(self._params_id[paramname.upper()]) oldParam.delete() self.update()
def _flag_del(self, flagname): if self._flag_isset(flagname): oldFlag = Record.ID(self._flags[flagname.upper()]) oldFlag.delete() self.update()