Пример #1
0
class Ui_Fg(object):
    def __init__(self):
        self.yaz = VbagKur()
        self.change_id = 0

    def setupUi(self, Fg):
        Fg.setObjectName("Fg")
        Fg.resize(518, 406)
        self.label = QtWidgets.QLabel(Fg)
        self.label.setGeometry(QtCore.QRect(10, 10, 100, 20))
        self.label.setObjectName("label")
        self.lineEdit = QtWidgets.QLineEdit(Fg)
        self.lineEdit.setGeometry(QtCore.QRect(90, 10, 200, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.pushButton = QtWidgets.QPushButton(Fg)
        self.pushButton.setGeometry(QtCore.QRect(320, 10, 75, 23))
        self.pushButton.setObjectName("pushButton")
        self.label_3 = QtWidgets.QLabel(Fg)
        self.label_3.setGeometry(QtCore.QRect(210, 50, 68, 20))
        self.label_3.setObjectName("label_3")
        self.label_4 = QtWidgets.QLabel(Fg)
        self.label_4.setGeometry(QtCore.QRect(210, 80, 68, 20))
        self.label_4.setObjectName("label_4")
        self.label_7 = QtWidgets.QLabel(Fg)
        self.label_7.setGeometry(QtCore.QRect(210, 170, 68, 20))
        self.label_7.setObjectName("label_7")
        self.label_8 = QtWidgets.QLabel(Fg)
        self.label_8.setGeometry(QtCore.QRect(210, 200, 91, 20))
        self.label_8.setObjectName("label_8")
        self.label_5 = QtWidgets.QLabel(Fg)
        self.label_5.setGeometry(QtCore.QRect(210, 110, 68, 20))
        self.label_5.setObjectName("label_5")
        self.label_10 = QtWidgets.QLabel(Fg)
        self.label_10.setGeometry(QtCore.QRect(210, 260, 68, 20))
        self.label_10.setObjectName("label_10")
        self.label_6 = QtWidgets.QLabel(Fg)
        self.label_6.setGeometry(QtCore.QRect(210, 140, 68, 20))
        self.label_6.setObjectName("label_6")
        self.label_9 = QtWidgets.QLabel(Fg)
        self.label_9.setGeometry(QtCore.QRect(210, 230, 68, 20))
        self.label_9.setObjectName("label_9")
        self.lineEdit_2 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_2.setGeometry(QtCore.QRect(310, 50, 181, 20))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.lineEdit_3 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_3.setGeometry(QtCore.QRect(310, 80, 181, 20))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.lineEdit_4 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_4.setGeometry(QtCore.QRect(310, 110, 181, 20))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.lineEdit_5 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_5.setGeometry(QtCore.QRect(310, 140, 181, 20))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.lineEdit_6 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_6.setGeometry(QtCore.QRect(310, 170, 181, 20))
        self.lineEdit_6.setObjectName("lineEdit_6")
        self.lineEdit_7 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_7.setGeometry(QtCore.QRect(310, 200, 181, 20))
        self.lineEdit_7.setObjectName("lineEdit_7")
        self.lineEdit_8 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_8.setGeometry(QtCore.QRect(310, 230, 181, 20))
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.lineEdit_9 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_9.setGeometry(QtCore.QRect(310, 260, 181, 20))
        self.lineEdit_9.setObjectName("lineEdit_9")
        self.pushButton_2 = QtWidgets.QPushButton(Fg)
        self.pushButton_2.setGeometry(QtCore.QRect(420, 350, 75, 23))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Fg)
        self.pushButton_3.setGeometry(QtCore.QRect(150, 160, 41, 41))
        self.pushButton_3.setObjectName("pushButton_3")
        self.listWidget = QtWidgets.QListWidget(Fg)
        self.listWidget.setGeometry(QtCore.QRect(10, 40, 131, 351))
        self.listWidget.setObjectName("listWidget")
        self.label_12 = QtWidgets.QLabel(Fg)
        self.label_12.setGeometry(QtCore.QRect(210, 290, 68, 20))
        self.label_12.setObjectName("label_12")
        self.lineEdit_10 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_10.setGeometry(QtCore.QRect(310, 290, 181, 20))
        self.lineEdit_10.setObjectName("lineEdit_10")
        self.label_13 = QtWidgets.QLabel(Fg)
        self.label_13.setGeometry(QtCore.QRect(210, 320, 68, 20))
        self.label_13.setObjectName("label_13")
        self.lineEdit_11 = QtWidgets.QLineEdit(Fg)
        self.lineEdit_11.setGeometry(QtCore.QRect(310, 320, 181, 20))
        self.lineEdit_11.setObjectName("lineEdit_11")

        self.retranslateUi(Fg)
        self.pushButton.clicked.connect(self.gemi_bul)
        self.pushButton_3.clicked.connect(self.gemi_sec)
        self.pushButton_2.clicked.connect(self.guncelle)
        self.listWidget.itemDoubleClicked.connect(self.gemi_sec)
        QtCore.QMetaObject.connectSlotsByName(Fg)

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

    def gemi_sec(self):
        soru = self.yaz.tek_oku("gemiler", "gad", self.listWidget.currentItem().text())
        self.lineEdit_2.setText(str(soru[0][1]))
        self.lineEdit_3.setText(soru[0][2])
        self.lineEdit_4.setText(soru[0][3])
        self.lineEdit_5.setText(soru[0][4])
        self.lineEdit_6.setText(soru[0][5])
        self.lineEdit_7.setText(soru[0][6])
        self.lineEdit_8.setText(soru[0][7])
        self.lineEdit_9.setText(soru[0][8])
        self.lineEdit_10.setText(soru[0][9])
        self.lineEdit_11.setText(soru[0][10])
        self.change_id = soru[0][0]

    def guncelle(self):
        self.yaz.gemi_guncelle(self.lineEdit_2.text(),
                               self.lineEdit_3.text(),
                               self.lineEdit_4.text(),
                               self.lineEdit_5.text(),
                               self.lineEdit_6.text(),
                               self.lineEdit_7.text(),
                               self.lineEdit_8.text(),
                               self.lineEdit_9.text(),
                               self.lineEdit_10.text(),
                               self.lineEdit_11.text(),
                               self.change_id
                               )
        mesaj = self.lineEdit_3.text() + " Gemisinin Kaydı Başarıyla Değiştirildi"
        mes.uyari(mesaj, "Bilgilendirme")
        self.lineEdit_2.clear()
        self.lineEdit_3.clear()
        self.lineEdit_4.clear()
        self.lineEdit_5.clear()
        self.lineEdit_6.clear()
        self.lineEdit_7.clear()
        self.lineEdit_8.clear()
        self.lineEdit_9.clear()
        self.lineEdit_10.clear()
        self.lineEdit_11.clear()
        self.listWidget.clear()
        self.gemi_bul()



    def retranslateUi(self, Fg):
        _translate = QtCore.QCoreApplication.translate
        Fg.setWindowTitle(_translate("Fg", "Gemi Bilgisi Düzenle"))
        self.label.setText(_translate("Fg", "Firma Kodu"))
        self.pushButton.setText(_translate("Fg", "Listele"))
        self.label_3.setText(_translate("Fg", "Müşteri"))
        self.label_4.setText(_translate("Fg", "Gemi Adı"))
        self.label_7.setText(_translate("Fg", "Defter No"))
        self.label_8.setText(_translate("Fg", "Belge No"))
        self.label_5.setText(_translate("Fg", "Gemi No"))
        self.label_10.setText(_translate("Fg", "İmo / Çağrı"))
        self.label_6.setText(_translate("Fg", "Gemi Cinsi"))
        self.label_9.setText(_translate("Fg", "Sicil No"))
        self.pushButton_2.setText(_translate("Fg", "Güncelle"))
        self.pushButton_3.setText(_translate("Fg", "Seç"))
        self.label_12.setText(_translate("Fg", "Acenta "))
        self.label_13.setText(_translate("Fg", "Acenta Tel"))
Пример #2
0
class Ui_YogunlukGuncelle(QtWidgets.QDialog):
    clicked = QtCore.pyqtSignal(bool)

    def __init__(self):
        super(Ui_YogunlukGuncelle, self).__init__()
        self.yaz = VbagKur()
        self.change_id_no = 0
        self.setupUi()

    def setupUi(self):
        self.setObjectName("YogunlukGuncelle")
        self.resize(671, 273)
        self.listWidget = QtWidgets.QListWidget(self)
        self.listWidget.setGeometry(QtCore.QRect(10, 40, 411, 211))
        self.listWidget.setObjectName("listWidget")
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(10, 10, 211, 20))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self)
        self.label_2.setGeometry(QtCore.QRect(440, 40, 80, 20))
        self.label_2.setObjectName("label_2")
        self.comboBox = QtWidgets.QComboBox(self)
        self.comboBox.setGeometry(QtCore.QRect(540, 40, 120, 22))
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.label_3 = QtWidgets.QLabel(self)
        self.label_3.setGeometry(QtCore.QRect(440, 70, 80, 20))
        self.label_3.setObjectName("label_3")
        self.lineEdit = QtWidgets.QLineEdit(self)
        self.lineEdit.setGeometry(QtCore.QRect(540, 70, 120, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit_2 = QtWidgets.QLineEdit(self)
        self.lineEdit_2.setGeometry(QtCore.QRect(540, 100, 120, 20))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.label_4 = QtWidgets.QLabel(self)
        self.label_4.setGeometry(QtCore.QRect(440, 100, 80, 20))
        self.label_4.setObjectName("label_4")
        self.lineEdit_3 = QtWidgets.QLineEdit(self)
        self.lineEdit_3.setGeometry(QtCore.QRect(540, 130, 120, 20))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.label_5 = QtWidgets.QLabel(self)
        self.label_5.setGeometry(QtCore.QRect(440, 130, 80, 20))
        self.label_5.setObjectName("label_5")
        self.lineEdit_4 = QtWidgets.QLineEdit(self)
        self.lineEdit_4.setGeometry(QtCore.QRect(540, 160, 120, 20))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.label_6 = QtWidgets.QLabel(self)
        self.label_6.setGeometry(QtCore.QRect(440, 160, 80, 20))
        self.label_6.setObjectName("label_6")

        self.lineEdit_5 = QtWidgets.QLineEdit(self)
        self.lineEdit_5.setGeometry(QtCore.QRect(540, 190, 120, 20))
        self.lineEdit_5.setObjectName("lineEdit_4")
        self.label_7 = QtWidgets.QLabel(self)
        self.label_7.setGeometry(QtCore.QRect(440, 190, 80, 20))
        self.label_7.setObjectName("label_6")
        self.label_7.setText("Beyanname No")

        self.pushButton = QtWidgets.QPushButton(self)
        self.pushButton.setGeometry(QtCore.QRect(580, 220, 75, 23))
        self.pushButton.setObjectName("pushButton")
        self.yogunluk_listele()

        self.retranslateUi()
        self.listWidget.itemDoubleClicked.connect(self.oyna)
        self.pushButton.clicked.connect(self.yguncelle)
        QtCore.QMetaObject.connectSlotsByName(self)

    def yogunluk_listele(self):
        sonuc = self.yaz.density_duzenle(self.yaz.hepsini_oku("", "densitys"))
        sayac = 0
        for i in range(int(len(sonuc) / 8)):
            a = str(sonuc[sayac]) + "   -->  " + \
                str(sonuc[sayac + 1]) + "   -->  " + \
                str(sonuc[sayac + 2]) + "   -->  " + \
                str(sonuc[sayac + 3]) + "   -->  " + \
                str(sonuc[sayac + 4]) + "   -->  " + \
                str(sonuc[sayac + 5]) + "   -->  " + \
                str(sonuc[sayac + 8]) + "   -->  "
            self.listWidget.addItem(a)
            sayac += 9

    def oyna(self):
        mersi = self.listWidget.currentItem().text()
        sayi = int((mersi[0:3]))
        sorgu = self.yaz.tek_oku("densitys", "id", sayi)
        self.comboBox.setCurrentText(sorgu[0][2])
        self.lineEdit.setText(sorgu[0][3])
        self.lineEdit_2.setText(sorgu[0][4])
        self.lineEdit_3.setText(sorgu[0][5])
        self.lineEdit_4.setText(sorgu[0][1])
        self.lineEdit_5.setText(str(sorgu[0][8]))
        self.change_id_no = sorgu[0][0]

    def yguncelle(self):
        self.yaz.yogunluk_gun(self.lineEdit_4.text(),
                              self.comboBox.currentText(),
                              self.lineEdit.text(), self.lineEdit_2.text(),
                              self.lineEdit_3.text(), self.change_id_no,
                              self.lineEdit_5.text())
        mesajlar.uyari("Yoğunluk Bilgileri başarıyla veritabanına kaydedildi",
                       "Bilgilendirme")
        self.comboBox.clear()
        self.lineEdit.clear()
        self.lineEdit_2.clear()
        self.lineEdit_3.clear()
        self.lineEdit_4.clear()
        self.lineEdit_5.clear()
        self.listWidget.clear()
        self.yogunluk_listele()
        self.on_changed_value(True)

    def retranslateUi(self):
        _translate = QtCore.QCoreApplication.translate
        self.setWindowTitle(_translate("YogunlukGuncelle",
                                       "Yoğunluk Güncelle"))
        self.label.setText(
            _translate("YogunlukGuncelle", "Stokta Bulunan Ürün Yoğunluklar"))
        self.label_2.setText(_translate("YogunlukGuncelle", "Ürün"))
        self.comboBox.setItemText(0, _translate("YogunlukGuncelle", "MOTORİN"))
        self.comboBox.setItemText(1, _translate("YogunlukGuncelle", "RME 180"))
        self.comboBox.setItemText(2, _translate("YogunlukGuncelle", "RMG 380"))
        self.label_3.setText(_translate("YogunlukGuncelle", "Litre"))
        self.label_4.setText(_translate("YogunlukGuncelle", "Kilogram"))
        self.label_5.setText(_translate("YogunlukGuncelle", "Yoğunluk"))
        self.label_6.setText(_translate("YogunlukGuncelle", "Yükleme Tarihi"))
        self.pushButton.setText(_translate("YogunlukGuncelle", "Güncelle"))

    def on_changed_value(self, value):
        self.clicked.emit(value)
Пример #3
0
class Ui_Firmaguncelle(VbagKur):
    def __init__(self):
        self.yaz = VbagKur()
        self.change_no = 0

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

        self.retranslateUi(Firmaguncelle)
        self.lineEdit.returnPressed.connect(self.bilgibul)
        self.pushButton.clicked.connect(self.guncelle)
        QtCore.QMetaObject.connectSlotsByName(Firmaguncelle)

    def guncelle(self):
        kod = self.lineEdit.text()
        ad = self.lineEdit_2.text()
        vergidairesi = self.lineEdit_3.text()
        vergino = self.lineEdit_4.text()
        telefon = self.lineEdit_5.text()
        adres = self.textEdit.toPlainText()
        self.yaz.firma_guncelle(kod, ad, vergidairesi, vergino, telefon, adres,
                                self.change_no)
        mesaj = ad + " Firmasının veritabanı kaydı başarıyla güncellendi"
        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()

        self.yaz.veritabanini_kapat()

    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])
            self.change_no = veri[0][0]

    def retranslateUi(self, Firmaguncelle):
        _translate = QtCore.QCoreApplication.translate
        Firmaguncelle.setWindowTitle(
            _translate("Firmaguncelle", "Müşteri Bilgisi Güncelle"))
        self.label_2.setText(_translate("Firmaguncelle", "Müşteri Adı"))
        self.label_4.setText(_translate("Firmaguncelle", "Vergi No"))
        self.label.setText(_translate("Firmaguncelle", "Müşteri Kodu"))
        self.label_3.setText(_translate("Firmaguncelle", "Vergi Dairesi"))
        self.label_5.setText(_translate("Firmaguncelle", "Adres"))
        self.label_6.setText(_translate("Firmaguncelle", "Telefon"))
        self.pushButton.setText(_translate("Firmaguncelle", "GÜNCELLE"))
Пример #4
0
class Ui_YerEkle(QtWidgets.QDialog):
    signal = QtCore.pyqtSignal(int)
    def __init__(self):
        super(Ui_YerEkle, self).__init__()
        self.yaz = VbagKur()
        self.setupUi()

    def setupUi(self):
        self.setObjectName("YerEkle")
        self.resize(367, 140)
        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, 100, 100))
        self.label.setText("")
        self.label.setPixmap(QtGui.QPixmap(":/rolix/docky.png"))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self)
        self.label_2.setGeometry(QtCore.QRect(140, 20, 60, 20))
        self.label_2.setObjectName("label_2")
        self.comboBox = QtWidgets.QComboBox(self)
        self.comboBox.setGeometry(QtCore.QRect(220, 20, 130, 22))
        self.comboBox.setObjectName("comboBox")
        self.label_3 = QtWidgets.QLabel(self)
        self.label_3.setGeometry(QtCore.QRect(140, 60, 60, 20))
        self.label_3.setObjectName("label_3")
        self.lineEdit = QtWidgets.QLineEdit(self)
        self.lineEdit.setGeometry(QtCore.QRect(220, 60, 130, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.pushButton = QtWidgets.QPushButton(self)
        self.pushButton.setGeometry(QtCore.QRect(278, 95, 75, 23))
        self.pushButton.setObjectName("pushButton")
        self.bolge_listele()

        self.retranslateUi()
        self.pushButton.clicked.connect(self.yekle)
        QtCore.QMetaObject.connectSlotsByName(self)

    def bolge_listele(self):
        soru = self.yaz.kolon_oku("ad", "bolge")
        sonuc = self.yaz.veri_duzenle(soru)
        for i in range(len(sonuc)):
            self.comboBox.addItem(sonuc[i])

    def yekle(self):
        b = self.comboBox.currentText()
        vtbolge = self.yaz.tek_oku("bolge", "ad", b)
        self.yaz.yer_ekle(self.lineEdit.text(), vtbolge[0][1])
        mesaj = self.lineEdit.text() + " veritabanına eklendi."
        mes.uyari(mesaj, "Bilgilendirme")
        self.lineEdit.clear()
        self.on_changed_value(2)


    def retranslateUi(self):
        _translate = QtCore.QCoreApplication.translate
        self.setWindowTitle(_translate("YerEkle", "Yer ekle"))
        self.label_2.setText(_translate("YerEkle", "Bölgesi"))
        self.label_3.setText(_translate("YerEkle", "Yer Adı"))
        self.pushButton.setText(_translate("YerEkle", "Ekle"))

    def on_changed_value(self, value):
        self.signal.emit(value)
Пример #5
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"))
Пример #6
0
class Ui_GemiBilgisiDuzenle(object):
    def __init__(self):
        self.yaz = VbagKur()

    def setupUi(self, GemiBilgisiDuzenle):
        GemiBilgisiDuzenle.setObjectName("GemiBilgisiDuzenle")
        GemiBilgisiDuzenle.resize(357, 362)
        self.label_2 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_2.setGeometry(QtCore.QRect(10, 40, 68, 20))
        self.label_2.setObjectName("label_2")
        self.label_7 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_7.setGeometry(QtCore.QRect(10, 190, 68, 20))
        self.label_7.setObjectName("label_7")
        self.label_5 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_5.setGeometry(QtCore.QRect(10, 130, 68, 20))
        self.label_5.setObjectName("label_5")
        self.label_4 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_4.setGeometry(QtCore.QRect(10, 100, 68, 20))
        self.label_4.setObjectName("label_4")
        self.label = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label.setGeometry(QtCore.QRect(10, 10, 68, 20))
        self.label.setObjectName("label")
        self.label_10 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_10.setGeometry(QtCore.QRect(10, 280, 68, 20))
        self.label_10.setObjectName("label_10")
        self.label_3 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_3.setGeometry(QtCore.QRect(10, 70, 68, 20))
        self.label_3.setObjectName("label_3")
        self.label_8 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_8.setGeometry(QtCore.QRect(10, 220, 91, 20))
        self.label_8.setObjectName("label_8")
        self.label_6 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_6.setGeometry(QtCore.QRect(10, 160, 68, 20))
        self.label_6.setObjectName("label_6")
        self.label_9 = QtWidgets.QLabel(GemiBilgisiDuzenle)
        self.label_9.setGeometry(QtCore.QRect(10, 250, 68, 20))
        self.label_9.setObjectName("label_9")
        self.lineEdit = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit.setGeometry(QtCore.QRect(140, 10, 200, 21))
        self.lineEdit.setObjectName("lineEdit")
        self.comboBox = QtWidgets.QComboBox(GemiBilgisiDuzenle)
        self.comboBox.setGeometry(QtCore.QRect(140, 40, 200, 21))
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.lineEdit_2 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_2.setGeometry(QtCore.QRect(140, 70, 200, 21))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.lineEdit_3 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_3.setGeometry(QtCore.QRect(140, 100, 200, 21))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.lineEdit_4 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_4.setGeometry(QtCore.QRect(140, 130, 200, 21))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.lineEdit_5 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_5.setGeometry(QtCore.QRect(140, 160, 200, 21))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.lineEdit_6 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_6.setGeometry(QtCore.QRect(140, 190, 200, 21))
        self.lineEdit_6.setObjectName("lineEdit_6")
        self.lineEdit_7 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_7.setGeometry(QtCore.QRect(140, 220, 200, 21))
        self.lineEdit_7.setObjectName("lineEdit_7")
        self.lineEdit_8 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_8.setGeometry(QtCore.QRect(140, 250, 200, 21))
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.lineEdit_9 = QtWidgets.QLineEdit(GemiBilgisiDuzenle)
        self.lineEdit_9.setGeometry(QtCore.QRect(140, 280, 200, 21))
        self.lineEdit_9.setObjectName("lineEdit_9")
        self.pushButton = QtWidgets.QPushButton(GemiBilgisiDuzenle)
        self.pushButton.setGeometry(QtCore.QRect(270, 320, 75, 23))
        self.pushButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.pushButton.setObjectName("pushButton")

        if self.comboBox.currentIndex() == 0:
            pass
        else:
            self.bilgi_bul()

        self.retranslateUi(GemiBilgisiDuzenle)
        self.lineEdit.returnPressed.connect(self.gemi_bul)
        #self.comboBox.currentIndexChanged['int'].connect(self.bilgi_bul)
        self.pushButton.clicked.connect(self.bilgi_guncelle)
        QtCore.QMetaObject.connectSlotsByName(GemiBilgisiDuzenle)

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

    def bilgi_bul(self):
        sor = self.yaz.tek_oku("gemiler", "gad", self.comboBox.currentText())
        self.lineEdit_2.setText(sor[0][3])
        self.lineEdit_3.setText(sor[0][4])
        self.lineEdit_4.setText(sor[0][5])
        self.lineEdit_5.setText(sor[0][6])
        self.lineEdit_6.setText(sor[0][7])
        self.lineEdit_7.setText(sor[0][8])
        self.lineEdit_8.setText(sor[0][9])
        self.lineEdit_9.setText(sor[0][10])
        self.change_no = sor[0][0]

    def bilgi_guncelle(self):
        kod = self.lineEdit.text()
        ad = self.comboBox.currentText()
        gkod = self.lineEdit_2.text()
        cins = self.lineEdit_3.text()
        dno = self.lineEdit_4.text()
        bno = self.lineEdit_5.text()
        sno = self.lineEdit_6.text()
        imo = self.lineEdit_7.text()
        ac = self.lineEdit_8.text()
        actel = self.lineEdit_9.text()
        self.yaz.gemi_guncelle(kod, ad, gkod, cins, dno, bno, sno, imo, ac,
                               actel, self.change_no)
        mesaj = ad + "Gemisi'nin Bilgileri başarıyla değiştirildi"
        mes.uyari(mesaj, "Bilgilendirme")
        self.comboBox.setCurrentIndex(0)

    def retranslateUi(self, GemiBilgisiDuzenle):
        _translate = QtCore.QCoreApplication.translate
        GemiBilgisiDuzenle.setWindowTitle(
            _translate("GemiBilgisiDuzenle", "Gemi Bilgisi Düzenle"))
        self.label_2.setText(_translate("GemiBilgisiDuzenle", "Gemi Adı"))
        self.label_7.setText(_translate("GemiBilgisiDuzenle", "Sicil No"))
        self.label_5.setText(_translate("GemiBilgisiDuzenle", "Defter No"))
        self.label_4.setText(_translate("GemiBilgisiDuzenle", "Gemi Cinsi"))
        self.label.setText(_translate("GemiBilgisiDuzenle", "Müşteri Kodu"))
        self.label_10.setText(_translate("GemiBilgisiDuzenle", "Acenta Tel"))
        self.label_3.setText(_translate("GemiBilgisiDuzenle", "Gemi Kodu"))
        self.label_8.setText(
            _translate("GemiBilgisiDuzenle", "İmo / Çağrı İşareti"))
        self.label_6.setText(_translate("GemiBilgisiDuzenle", "Belge No"))
        self.label_9.setText(_translate("GemiBilgisiDuzenle", "Acenta"))
        self.comboBox.setItemText(0,
                                  _translate("GemiBilgisiDuzenle", "Gemi Seç"))
        self.pushButton.setText(_translate("GemiBilgisiDuzenle", "Güncelle"))