public Profile() { InitializeComponent(); UserLoginResponseDto response = EmployePanel.GetResponseDto(); user = response.User; patrimoineRepository = new PatrimoineRepository(); }
private void addToLoginPanel(string user) { if (user == "admin") { AdminPanel adminPanel = new AdminPanel(); loginPanel.Controls.Clear(); loginPanel.Controls.Add(adminPanel); isAdmin = true; } else if (user == "employee") { EmployePanel employePanel = new EmployePanel(); loginPanel.Controls.Clear(); loginPanel.Controls.Add(employePanel); isAdmin = false; } }