Exemple #1
0
    def Logoff(self):
        answer = tkinter.messagebox.askquestion("Logout", "Are you sure you want to logout? ")

        if answer == "yes":
            tkinter.messagebox.showinfo("Logout", "Goodbye")
            self.root.destroy()

            master = tk.Tk()
            root.geometry("350x200")
            login1 = login.Login(master)
            master.mainloop()
            if login1.dept == "Receiving":
                master = tk.Tk()
                master.geometry("650x500")
                master.configure(bg="light gray")
                receiving1 = receiving.Receiving(master)
                master.mainloop()
            elif login1.dept == "Assembly":
                workorder = selection.WOWindow(login1.dept)
                master = tk.Tk()
                master.geometry("665x340")
                master.title("Assembly")
                app = assembly_class.Assembly(master, "0002")
                master.mainloop()
            elif login1.dept == "Testing":
                workorder = selection.WOWindow(login1.dept)
                master = tk.Tk()
                master.geometry("680x500")
                master.title("Testing")
                app = testing.TestingWindow(master, "0003")
                master.mainloop()
            elif login1.dept == "Shipping":
                workorder = selection.WOWindow(login1.dept)
                master = tk.Tk()
                master.geometry("680x400")
                app = shipping.Shipping(master, "0004")
                master.mainloop()
            elif login1.dept == "Accounting":
                master = tk.Tk()
                master.geometry("500x300")
                master.title("Accounting")
                close_window = tk.Button(master, text="Close", command=master.quit)
                close_window.place(x=90, y=230)
                app = accounting(root, "0005")

            elif login1.dept == "Admin":
                master = tk.Tk()
                master.geometry("600x500")
                master.title("New User")
                master.configure(bg="light gray")
                admin1 = admin.Admin(master)
                master.mainloop()
    def Logoff(self):
        answer = tkinter.messagebox.askquestion(
            "Logout", "Are you sure you want to logout? ")

        if answer == "yes":
            tkinter.messagebox.showinfo("Logout", "Goodbye")
            self.root.destroy()

            root = Tk()
            root.geometry("350x200")
            root.title("Login")
            root.resizable(False, False)
            login1 = login.Login(root)
            root.mainloop()
            if login1.dept == "Receiving":
                root = Tk()
                root.geometry("400x500")
                root.title("Receiving")
                root.resizable(False, False)
                root.configure(bg="light gray")
                receiving1 = receiving.Receiving(root)
                root.mainloop()
            elif login1.dept == "Assembly":
                root = Tk()
                root.geometry("665x380")
                root.title("Assembly")
                root.resizable(False, False)
                app = assembly_class.Assembly(root, "0002")
                root.mainloop()
            elif login1.dept == "Testing":
                root = Tk()
                root.geometry("680x500")
                root.title("Testing")
                root.resizable(False, False)
                app = testing.TestingWindow(root, "0003")
                root.mainloop()
            elif login1.dept == "Shipping":
                root = Tk()
                root.geometry("665x380")
                root.title("Shipping")
                root.resizable(False, False)
                shipping.Shipping(root, "0004")
                root.mainloop()
            elif login1.dept == "Accounting":
                root = Tk()
                root.geometry("500x300")
                root.title("Accounting")
                root.resizable(False, False)
                close_window = Button(root, text="Close", command=root.quit)
                close_window.place(x=90, y=230)
                app = accounting.accounting(root, "0005")
                root.mainloop()
            elif login1.dept == "Admin":
                root = Tk()
                root.geometry("600x500")
                root.title("New User")
                root.resizable(False, False)
                root.configure(bg="light gray")
                admin1 = admin.Admin(root)
                root.mainloop()
            elif login1.dept == "Inventory":
                root = Tk()
                root.geometry("620x500")
                root.title("Inventory")
                root.resizable(False, False)
                app = inventory.Inventory(root)
                root.mainloop()