Example #1
0
 def onMemo(self,evt):
   dlg = MemoDialog(self,DialogClassParameters(MEMO_ID,'Add/Edit Memo'))
   if (dlg.ShowModal() == MEMO_BUTTONCOMMIT_ID):
     memoName = dlg.name()
     memoTxt = dlg.memo()
     self.addMemo(memoName,memoTxt)
   dlg.Destroy()
Example #2
0
 def displayMemo(self,fromIdx,toIdx):
   try:
     cmValue = self.theMemos[(fromIdx,toIdx)]
     b = Borg() 
     cmObjt = b.dbProxy.dimensionObject(cmValue[0],'memo') 
     dlg = MemoDialog(self,DialogClassParameters(MEMO_ID,'View Memo'))
     dlg.load(cmObjt)
     if (dlg.ShowModal() == MEMO_BUTTONCOMMIT_ID):
       memoName = dlg.name()
       memoTxt = dlg.memo()
       self.theMemos[(fromIdx,toIdx)] = (memoName,memoTxt)
       b = Borg()
       p = MemoParameters(memoName,memoTxt)
       p.setId(cmObjt.id())
       b.dbProxy.updateMemo(p)
     dlg.Destroy()
   except KeyError:
     return