def nextFrame(self): un = self.e1.get() pw = self.e2.get() if un == '': self.msg.set("User name cannot be empty") return elif pw == '': self.msg.set("Password cannot be empty") else: try: LoginDetails.con = connect.DBConnect.getConn() print("Connected to database") cur = LoginDetails.con.cursor() cur.execute( "select username ,password from admin where username='******'" % un) row = cur.fetchone() if un == row[0] and pw == row[1]: self.root.destroy() takeop = Tk() operateaccount.TakeOperation(takeop) else: self.msg.set("Exception : Invalid Login") finally: if LoginDetails.con != '': LoginDetails.con.close() print("Connection released") return
def backWindow(self): self.root.destroy() back = Tk() operateaccount.TakeOperation(back) return
def menu(self): self.root.destroy() takeop = Tk() operateaccount.TakeOperation(takeop)