예제 #1
0
            if not query.lastError().type() == QSqlError.NoError:
                if transaction:
                    qApp.instance().db_con.rollback()
                log.err('Error en la DB: %s' %
                        query.lastError().databaseText())
            else:
                if transaction:
                    commit = qApp.instance().db_con.commit()
                    log.msg('Commit exitoso %s' % commit)
                self.esquina_id = esquina_id

        except Exception, e:
            log.err(str(e))
            if transaction:
                qApp.instance().db_con.rollback()
        return ConfigWizard.accept(self)


class SeleccionCOyUC(QWidget):
    def __init__(self, parent):
        QWidget.__init__(self, parent)

        layout = QVBoxLayout(self)
        label1 = QLabel(
            '''
        <h3>Seleccione el concentrador y la UC</h3>
        <p>Seleccione un concentrador de la lista inferior</p>
        ''', self)
        layout.addWidget(label1)
        self.comboCOs = QComboBoxModelQuery(self)
        self.comboCOs.setObjectName('comboCOs')
예제 #2
0
            
            if not query.lastError().type() == QSqlError.NoError:
                if transaction:
                    qApp.instance().db_con.rollback()
                log.err('Error en la DB: %s' % query.lastError().databaseText())
            else:
                if transaction:
                    commit = qApp.instance().db_con.commit()
                    log.msg('Commit exitoso %s' % commit)
                self.esquina_id = esquina_id
            
        except Exception, e:
            log.err(str(e))
            if transaction:
                qApp.instance().db_con.rollback()
        return ConfigWizard.accept(self)
    
class SeleccionCOyUC(QWidget):
    def __init__(self, parent):
        QWidget.__init__(self, parent)
        
        layout = QVBoxLayout(self)
        label1 = QLabel('''
        <h3>Seleccione el concentrador y la UC</h3>
        <p>Seleccione un concentrador de la lista inferior</p>
        ''', self)
        layout.addWidget(label1)
        self.comboCOs = QComboBoxModelQuery(self)
        self.comboCOs.setObjectName('comboCOs')
        
        query = QSqlQuery('''