Esempio n. 1
0
 def set_frame(self, frame_class, account=None):
     self.clear_frame(self.view.container)  # clear container
     if account is None:
         frame = frame_class(self.view.container, self.model, self)
     else:
         frame = frame_class(self.view.container, self.model, self,
                             AccountTeam(account.getAccountTeam()).name,
                             AccountType(account.getAccountType()).name,
                             account.getEmail())
     frame.pack()
Esempio n. 2
0
    def create_widgets(self):
        account = self.model.account_db.getByEmail(self.master.user)
        if account is False:
            ttk.Label(self, text="User account not found").grid()
            return

        ttk.Label(self, text="Full name:").grid(row=0, sticky="E")
        ttk.Label(self, text="Username:"******"E")
        ttk.Label(self, text="Password:"******"E")
        ttk.Label(self, text="Account team:").grid(row=3, sticky="E")
        ttk.Label(self, text="Account type:").grid(row=4, sticky="E")
        ttk.Label(self, text="Job title:").grid(row=5, sticky="E")
        ttk.Label(self, text="Comment:").grid(row=6, sticky="E")

        self.e1 = ttk.Entry(self)
        self.e1.grid(row=0, column=1)
        self.e1.insert(0, account.getName())

        self.e2 = account.getEmail()
        ttk.Label(self, text=self.e2).grid(row=1, column=1, sticky="W")

        self.e3 = ttk.Entry(self, show="*")
        self.e3.grid(row=2, column=1)
        self.e3.insert(0, account.getPassword())

        self.e4 = account.getAccountTeam()
        ttk.Label(self, text=AccountTeam(self.e4).name).grid(row=3,
                                                             column=1,
                                                             sticky="W")

        self.e5 = account.getAccountType()
        ttk.Label(self, text=AccountType(self.e5).name).grid(row=4,
                                                             column=1,
                                                             sticky="W")

        self.e6 = account.getDepartment()
        ttk.Label(self, text=self.e6).grid(row=5, column=1, sticky="W")

        self.e7 = ttk.Entry(self)
        self.e7.grid(row=6, column=1)
        self.e7.insert(0, account.getComment())

        b1 = ttk.Button(self,
                        text="Save",
                        command=lambda: self.ctrl.config_save(self))
        b1.grid(columnspan=2)
Esempio n. 3
0
 def __init__(self):
     self.root = FrameTests(HR,
                            AccountTeam(2).name,
                            AccountType(3).name, "*****@*****.**")
Esempio n. 4
0
 def __init__(self):
     self.root = FrameTests(Financial,
                            AccountTeam(5).name,
                            AccountType(3).name, "*****@*****.**")
Esempio n. 5
0
 def __init__(self):
     self.root = FrameTests(CustomerService,
                            AccountTeam(3).name,
                            AccountType(1).name, "*****@*****.**")
Esempio n. 6
0
 def __init__(self):
     self.root = FrameTests(Marketing,
                            AccountTeam(4).name,
                            AccountType(3).name, "*****@*****.**")
Esempio n. 7
0
 def __init__(self):
     self.root = FrameTests(Service, AccountTeam(7).name, AccountType(3).name, "*****@*****.**")
Esempio n. 8
0
 def __init__(self):
     self.root = FrameTests(Production, AccountTeam(6).name, AccountType(3).name, "*****@*****.**")
Esempio n. 9
0
 def __init__(self):
     self.root = FrameTests(TopManagement,
                            AccountTeam(8).name,
                            AccountType(3).name, "*****@*****.**")