示例#1
0
        except StandardError, msg:
            self.__MDI__.MsgErr("stpskcon","FndAnag Error %s " % (msg))
        self.CnAz.commit()
        if (cnt_rec==0):self.Message(cfg.msgdatonull,self.ttl)
        elif (cnt_rec==1 and cnt_rec<2): self.FndSelAnag(row)
        elif (cnt_rec>1):
            try:
	        import srcanag
            except :
	        pass
            try:
                import base.srcanag
            except :
                pass
            control = [self.tcpart,self.codcf,self.ragsoc1,self.FndCodCF]               
            win = srcanag.create(self,control) 
            win.Centre(wx.BOTH)
            win.Show(True)
        else:
            self.inte.Show(True)
            self.inte.Enable(True)
            self.canc.Show(False)
            self.canc.Enable(False)
            self.FndMovCorpolc(self)
            self.ragsoc1.Enable(False)
            self.ragsoc2.Enable(False)

    def FndSelAnag(self, evt):
        row = evt
        self.codcf.SetValue(str(row[1]))
        self.ragsoc1.SetValue(str(row[3]).title())
示例#2
0
文件: lstscad.py 项目: phasis/phasis
            rows = cr.fetchall()
            for row in rows:
                cnt_rec += 1
        except StandardError, msg:
            self.__MDI__.MsgErr("movcon", "FndAnag Error %s " % (msg))
        self.CnAz.commit()
        if (cnt_rec == 0): self.Message(cfg.msgdatonull, self.ttl)
        elif (cnt_rec == 1 and cnt_rec < 2): self.FndSelAnag(row)
        elif (cnt_rec > 1):
            try:
                import srcanag
            except:
                pass

            control = [self.tcpart, self.codcf, self.ragsoc1, self.FndCodCF]
            win = srcanag.create(self, control)
            win.Centre(wx.BOTH)
            win.Show(True)

    def FndSelAnag(self, evt):
        row = evt
        self.codcf.SetValue(str(row[1]))
        self.ragsoc2.SetValue(str(row[4]).title())
        self.ragsoc1.SetValue(str(row[3]).title())

    # INIZIO FUNZIONI FIND

    def FndSelScad(self, evt):
        anno = self.annoc
        num_scad = self.num_scad.GetValue()
        data_scad = self.data_scad.GetValue()