Пример #1
0
 def OnRegSearch(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     if self.status == STATUS_SELCAUS:
         self.RegSearch()
     elif self.status == STATUS_DISPLAY:
         self.SetRegStatus(STATUS_SELCAUS)
Пример #2
0
 def OnRegNew(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     if self.status == STATUS_SELCAUS:
         if self.controls["causale"].GetValue() is None:
             aw.awu.MsgDialog(self, "Seleziona la causale", style=wx.ICON_ERROR)
         else:
             self.RegNew()
Пример #3
0
 def OnRegDelete(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     action = MsgDialog(
         self,
         """Sei sicuro di voler cancellare la registrazione ?  Confermando, la """
         """registrazione non sarà più recuperabile in alcun modo.  """
         """Confermi l'operazione di eliminazione ?""",
         style=wx.ICON_QUESTION | wx.YES_NO | wx.NO_DEFAULT,
     )
     if action == wx.ID_YES:
         if self.RegDelete():
             self.SetRegStatus(STATUS_SELCAUS)
             event.Skip()
Пример #4
0
 def OnRegEnd(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     if round(self.totdare, 6) == round(self.totavere, 6):
         if self.RegSave():
             if self.oneregonly_id:
                 try:
                     if self.GetParent().IsModal():
                         self.GetParent().EndModal(REG_MODIFIED)
                 except:
                     self.Destroy()
             else:
                 self.SetRegStatus(STATUS_SELCAUS)
     else:
         MsgDialog(
             self,
             """Non è possibile confermare la registrazione in quanto risulta """
             """squadrata.  Eliminare la squadratura e riprovare.""",
         )
Пример #5
0
 def OnRegQuit(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     quit = True
     if self.editing:
         action = MsgDialog(
             self,
             """La registrazione risulta essere modificata.  confermandone """
             """l'abbandono, andranno persi i dati fin qui inseriti.  """
             """Confermi l'abbandono ?""",
             style=wx.ICON_QUESTION | wx.YES_NO | wx.NO_DEFAULT,
         )
         quit = action == wx.YES
     if quit:
         if self.oneregonly_id:
             try:
                 if self.GetParent().IsModal():
                     self.GetParent().EndModal(REG_UNMODIFIED)
             except:
                 self.Destroy()
         else:
             self.SetRegStatus(STATUS_SELCAUS)
Пример #6
0
 def OnRegModify(self, event):
     if not is_pushable(event.GetEventObject()):
         return
     self.SetRegStatus(STATUS_EDITING)
     event.Skip()