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()
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)
def __init__(self): self.root = FrameTests(HR, AccountTeam(2).name, AccountType(3).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(Financial, AccountTeam(5).name, AccountType(3).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(CustomerService, AccountTeam(3).name, AccountType(1).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(Marketing, AccountTeam(4).name, AccountType(3).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(Service, AccountTeam(7).name, AccountType(3).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(Production, AccountTeam(6).name, AccountType(3).name, "*****@*****.**")
def __init__(self): self.root = FrameTests(TopManagement, AccountTeam(8).name, AccountType(3).name, "*****@*****.**")