def add_enr(self,surn, name, patr, addr, birth, passp, listbox): Enrollee.create(surn.get(), name.get(), patr.get(), addr.get(), birth.get(), passp.get()) surn.delete(0,END) name.delete(0, END) patr.delete(0, END) addr.delete(0, END) birth.delete(0, END) passp.delete(0, END) self.update_all(listbox)
def add_enrollee(): try: surname = input("Enter surname: ") name = input("Enter name: ") patronymic = input("Enter patronymic: ") address = input("Enter address: ") birthday = datetime.strptime( input("Enter date of birthday(DD.MM.YYYY): "), '%d.%m.%Y').date().strftime('%d.%m.%Y') passport = input("Enter number of passport: ") Enrollee.create(surname, name, patronymic, address, birthday, passport) except: print("Error")
def addEnrolleeOnClick(self): Enrollee.create(self.surnameEdit.text(), self.nameEdit.text(), self.patronymicEdit.text(), self.addressEdit.text(), self.birthdayEdit.date().toString("dd.MM.yyyy"), self.passportEdit.text()) self.updateAllList()