示例#1
0
class Ui_PersonelSil(QtWidgets.QDialog):
    signal = QtCore.pyqtSignal(int)
    def __init__(self):
        super(Ui_PersonelSil, self).__init__()
        self.yaz = VbagKur()
        self.setupUi()

    def setupUi(self):
        self.setObjectName("PersonelSil")
        self.resize(452, 197)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/rolix/dialog-error.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.setWindowIcon(icon)
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(10, 10, 121, 121))
        self.label.setText("")
        self.label.setPixmap(QtGui.QPixmap(":/rolix/dialog-error.png"))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.listWidget = QtWidgets.QListWidget(self)
        self.listWidget.setGeometry(QtCore.QRect(120, 10, 311, 141))
        self.listWidget.setObjectName("listWidget")
        self.pushButton = QtWidgets.QPushButton(self)
        self.pushButton.setGeometry(QtCore.QRect(360, 160, 73, 23))
        self.pushButton.setObjectName("pushButton")
        self.personel_bul()

        self.retranslateUi()
        self.pushButton.clicked.connect(self.perisil)
        self.listWidget.itemDoubleClicked['QListWidgetItem*'].connect(self.perisil)
        QtCore.QMetaObject.connectSlotsByName(self)

    def personel_bul(self):
        sorgu = self.yaz.kolon_oku("ad", "personel")
        for i in range(len(sorgu)):
            self.listWidget.addItem(sorgu[i][0])

    def perisil(self):
        if mes.per_sil(self.listWidget.currentItem().text()) == True:
            self.yaz.kayit_sil("personel", "ad", self.listWidget.currentItem().text())
            self.listWidget.clear()
            self.personel_bul()
            self.on_changed_value(1)
        else:
            pass


    def retranslateUi(self):
        _translate = QtCore.QCoreApplication.translate
        self.setWindowTitle(_translate("PersonelSil", "Personel Sil"))
        self.pushButton.setText(_translate("PersonelSil", "Sil"))

    def on_changed_value(self, value):
        self.signal.emit(value)
示例#2
0
class Ui_GemiSil(object):
    def __init__(self):
        self.yaz = VbagKur()

    def setupUi(self, GemiSil):
        GemiSil.setObjectName("GemiSil")
        GemiSil.resize(306, 349)
        self.label = QtWidgets.QLabel(GemiSil)
        self.label.setGeometry(QtCore.QRect(10, 10, 100, 20))
        self.label.setObjectName("label")
        self.lineEdit = QtWidgets.QLineEdit(GemiSil)
        self.lineEdit.setGeometry(QtCore.QRect(90, 10, 111, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.pushButton = QtWidgets.QPushButton(GemiSil)
        self.pushButton.setGeometry(QtCore.QRect(210, 10, 72, 23))
        self.pushButton.setObjectName("pushButton")
        self.listWidget = QtWidgets.QListWidget(GemiSil)
        self.listWidget.setGeometry(QtCore.QRect(10, 40, 271, 291))
        self.listWidget.setObjectName("listWidget")

        self.retranslateUi(GemiSil)
        self.pushButton.clicked.connect(self.gemi_bul)
        self.listWidget.itemDoubleClicked.connect(self.sil)
        QtCore.QMetaObject.connectSlotsByName(GemiSil)

    def gemi_bul(self):
        self.listWidget.clear()
        sor = self.yaz.hepsini_oku("gad", "gemiler", "kod",
                                   self.lineEdit.text())
        for i in range(len(sor)):
            self.listWidget.addItem(sor[i][0])

    def sil(self):
        if mes.soru(self.listWidget.currentItem().text()) == True:
            self.yaz.kayit_sil("gemiler", "gad",
                               self.listWidget.currentItem().text())
            self.listWidget.clear()
            self.gemi_bul()
        else:
            pass

    def retranslateUi(self, GemiSil):
        _translate = QtCore.QCoreApplication.translate
        GemiSil.setWindowTitle(_translate("GemiSil", "Gemi Kaydı Sil"))
        self.label.setText(_translate("GemiSil", "Müşteri Kodu"))
        self.pushButton.setText(_translate("GemiSil", "Listele"))
示例#3
0
class Ui_BolgeYerSil(QtWidgets.QDialog):
    signal = QtCore.pyqtSignal(int)

    def __init__(self):
        super(Ui_BolgeYerSil, self).__init__()
        self.yaz = VbagKur()
        self.setupUi()

    def setupUi(self):
        self.setObjectName("BolgeYerSil")
        self.resize(632, 316)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/rolix/docky.png"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        self.setWindowIcon(icon)
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(10, 10, 91, 61))
        self.label.setText("")
        self.label.setPixmap(
            QtGui.QPixmap(":/rolix/scalable/package-remove.svg"))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.groupBox = QtWidgets.QGroupBox(self)
        self.groupBox.setGeometry(QtCore.QRect(10, 80, 300, 225))
        self.groupBox.setObjectName("groupBox")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.listWidget = QtWidgets.QListWidget(self.groupBox)
        self.listWidget.setObjectName("listWidget")
        self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
        self.groupBox_2 = QtWidgets.QGroupBox(self)
        self.groupBox_2.setGeometry(QtCore.QRect(320, 80, 300, 225))
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout.setObjectName("gridLayout")
        self.listWidget_2 = QtWidgets.QListWidget(self.groupBox_2)
        self.listWidget_2.setObjectName("listWidget_2")
        self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self)
        self.label_2.setGeometry(QtCore.QRect(100, 10, 511, 51))
        self.label_2.setObjectName("label_2")
        self.bilgi_listele()

        self.retranslateUi()
        self.listWidget.itemDoubleClicked.connect(self.silb)
        self.listWidget_2.itemDoubleClicked.connect(self.sily)
        QtCore.QMetaObject.connectSlotsByName(self)

    def bilgi_listele(self):
        self.listWidget.addItems(
            self.yaz.coklu_tup_temizle(self.yaz.kolon_oku("ad, kod", "bolge")))
        self.listWidget_2.addItems(
            self.yaz.coklu_tup_temizle(self.yaz.kolon_oku("ad", "yer")))

    def silb(self):
        if mes.yerbolsil(self.listWidget.currentItem().text()) == True:
            kay_no = self.yaz.komut(
                "select kod from bolge where ad='{}'".format(
                    self.listWidget.currentItem().text()))
            self.yaz.isle("delete from yer where kod ='{}'".format(kay_no[0]))
            self.yaz.kayit_sil("bolge", "ad",
                               self.listWidget.currentItem().text())
            self.listWidget.clear()
            self.listWidget_2.clear()
            self.bilgi_listele()
            self.on_changed_value(1)
        else:
            pass

    def sily(self):
        if mes.yerbolsil(self.listWidget_2.currentItem().text()) == True:
            self.yaz.kayit_sil("yer", "ad",
                               self.listWidget_2.currentItem().text())
            self.listWidget.clear()
            self.listWidget_2.clear()
            self.bilgi_listele()
            self.on_changed_value(2)
        else:
            pass

    def retranslateUi(self):
        _translate = QtCore.QCoreApplication.translate
        self.setWindowTitle(_translate("BolgeYerSil", "Bölge Ve Yer Sil"))
        self.groupBox.setTitle(_translate("BolgeYerSil", "Bölge Listesi"))
        self.groupBox_2.setTitle(_translate("BolgeYerSil", "Yer Listesi"))
        self.label_2.setText(
            _translate(
                "BolgeYerSil",
                "Veritabanından silmek istediğiniz Bölge veya Yer bilgisinin üzerine çift tıklayınız."
            ))

    def on_changed_value(self, value):
        self.signal.emit(value)
示例#4
0
class Ui_Firmasil(VbagKur):
    def __init__(self):
        self.yaz = VbagKur()

    def setupUi(self, Firmasil):
        Firmasil.setObjectName("Firmasil")
        Firmasil.resize(400, 300)
        self.label = QtWidgets.QLabel(Firmasil)
        self.label.setGeometry(QtCore.QRect(10, 10, 68, 20))
        self.label.setObjectName("label")
        self.lineEdit = QtWidgets.QLineEdit(Firmasil)
        self.lineEdit.setGeometry(QtCore.QRect(90, 10, 291, 21))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit_2 = QtWidgets.QLineEdit(Firmasil)
        self.lineEdit_2.setGeometry(QtCore.QRect(90, 40, 291, 21))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.label_2 = QtWidgets.QLabel(Firmasil)
        self.label_2.setGeometry(QtCore.QRect(10, 40, 68, 20))
        self.label_2.setObjectName("label_2")
        self.lineEdit_3 = QtWidgets.QLineEdit(Firmasil)
        self.lineEdit_3.setGeometry(QtCore.QRect(90, 70, 291, 21))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.label_3 = QtWidgets.QLabel(Firmasil)
        self.label_3.setGeometry(QtCore.QRect(10, 70, 68, 20))
        self.label_3.setObjectName("label_3")
        self.lineEdit_4 = QtWidgets.QLineEdit(Firmasil)
        self.lineEdit_4.setGeometry(QtCore.QRect(90, 100, 291, 21))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.label_4 = QtWidgets.QLabel(Firmasil)
        self.label_4.setGeometry(QtCore.QRect(10, 100, 68, 20))
        self.label_4.setObjectName("label_4")
        self.label_5 = QtWidgets.QLabel(Firmasil)
        self.label_5.setGeometry(QtCore.QRect(10, 130, 68, 20))
        self.label_5.setObjectName("label_5")
        self.lineEdit_5 = QtWidgets.QLineEdit(Firmasil)
        self.lineEdit_5.setGeometry(QtCore.QRect(90, 130, 291, 21))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.label_6 = QtWidgets.QLabel(Firmasil)
        self.label_6.setGeometry(QtCore.QRect(10, 160, 68, 20))
        self.label_6.setObjectName("label_6")
        self.textEdit = QtWidgets.QTextEdit(Firmasil)
        self.textEdit.setGeometry(QtCore.QRect(90, 170, 291, 81))
        self.textEdit.setObjectName("textEdit")
        self.pushButton = QtWidgets.QPushButton(Firmasil)
        self.pushButton.setGeometry(QtCore.QRect(310, 270, 75, 23))
        self.pushButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.pushButton.setObjectName("pushButton")

        self.retranslateUi(Firmasil)
        self.pushButton.clicked.connect(self.sil)
        self.lineEdit.returnPressed.connect(self.bilgibul)
        QtCore.QMetaObject.connectSlotsByName(Firmasil)

    def sil(self):
        kod = self.lineEdit.text()
        ad = self.lineEdit_2.text()

        self.yaz.kayit_sil("firmalar", "kod", kod)
        mesaj = ad + " Firmasının veritabanı kaydı başarıyla silindi"
        mes.uyari(mesaj, "Bilgilendirme")

        self.lineEdit.clear()
        self.lineEdit_2.clear()
        self.lineEdit_3.clear()
        self.lineEdit_4.clear()
        self.lineEdit_5.clear()
        self.textEdit.clear()

    def bilgibul(self):
        if self.lineEdit.text() == "":
            pass
        else:
            veri = self.yaz.tek_oku("firmalar", "kod", self.lineEdit.text())
            self.lineEdit_2.setText(veri[0][2])
            self.lineEdit_3.setText(veri[0][3])
            self.lineEdit_4.setText(veri[0][4])
            self.lineEdit_5.setText(veri[0][5])
            self.textEdit.setPlainText(veri[0][6])

    def retranslateUi(self, Firmasil):
        _translate = QtCore.QCoreApplication.translate
        Firmasil.setWindowTitle(_translate("Firmasil", "Müşteri Sil"))
        self.label.setText(_translate("Firmasil", "Müşteri Kodu"))
        self.label_2.setText(_translate("Firmasil", "Müşteri Adı"))
        self.label_3.setText(_translate("Firmasil", "Vergi Dairesi"))
        self.label_4.setText(_translate("Firmasil", "Vergi No"))
        self.label_5.setText(_translate("Firmasil", "Telefon"))
        self.label_6.setText(_translate("Firmasil", "Adres"))
        self.pushButton.setText(_translate("Firmasil", "Sil"))