Exemplo n.º 1
0
    def doAddOwner(self):
        if self.guidPN == '':
            self.guidPN = str(uuid.uuid4())

            listNames = attributesNamesParcelNeighbour
            listValues = []

            listValues.append(self.guidPN)
            listValues.append(self.idParcel)
            listValues.append(self.lineEditDefinition.text())
            listValues.append(self.lineEditCadastralNumber.text())

            if not insertFeatures('pb_parcel_neighbour', listNames,
                                  [listValues]):
                QMessageBox.warning(
                    self.iface.mainWindow(), u'Ошибка редактирования данных',
                    u'Произошла ошибка при создании смежного ЗУ')
                return
            else:
                self.action = 'edit'

        d = OwnerNeighbour(self.iface)
        d.guidPN = self.guidPN
        d.action = 'add'
        d.dlgFill()

        result = d.exec_()
        if result == 1:
            self.dlgFill()

        del d
Exemplo n.º 2
0
    def doAddOwner(self):
        if self.guidPN == '':
            self.guidPN = str(uuid.uuid4())
    
            listNames   = attributesNamesParcelNeighbour
            listValues  = []

            listValues.append(self.guidPN)
            listValues.append(self.idParcel)
            listValues.append(self.lineEditDefinition.text())
            listValues.append(self.lineEditCadastralNumber.text())

            if not insertFeatures('pb_parcel_neighbour', 
                                  listNames, [listValues]):
                QMessageBox.warning(self.iface.mainWindow(), u'Ошибка редактирования данных', 
                                                             u'Произошла ошибка при создании смежного ЗУ')
                return
            else:
                self.action = 'edit'

        d = OwnerNeighbour(self.iface)
        d.guidPN = self.guidPN
        d.action = 'add'
        d.dlgFill()
        
        result =  d.exec_()
        if result == 1:
            self.dlgFill()
        
        del d
Exemplo n.º 3
0
    def doEditOwner(self):
        currentTreeItem = self.treeWidget.currentItem()
        if currentTreeItem == None:
            return

        d = OwnerNeighbour(self.iface)
        d.guidPN = self.guidPN
        d.guidON = currentTreeItem.data(2, 0)
        d.action = 'edit'
        d.dlgFill()

        result = d.exec_()
        if result == 1:
            self.dlgFill()

        del d
Exemplo n.º 4
0
    def doEditOwner(self):
        currentTreeItem = self.treeWidget.currentItem()
        if currentTreeItem == None:
            return

        d = OwnerNeighbour(self.iface)
        d.guidPN = self.guidPN
        d.guidON = currentTreeItem.data(2, 0)
        d.action = 'edit'
        d.dlgFill()

        result =  d.exec_()
        if result == 1:
            self.dlgFill()
        
        del d