private void SetPage(UserRole role, string username) { var userId = _userBusinessComponent.GetIdByLogin(username); var window = Window.GetWindow(this); window.SizeToContent = SizeToContent.WidthAndHeight; window.Title = "Bank Victoria"; switch (role) { case UserRole.Admin: window.Content = _ninjectKernel.Get <AdministratorPage>( new ConstructorArgument("clientToUpdate", (Client)null)); break; case UserRole.Client: window.Content = _ninjectKernel.Get <ClientWindow>(new ConstructorArgument("userId", userId)); //_ninjectKernel.Get<ClientWindow>(); break; case UserRole.Operator: window.Content = _ninjectKernel.Get <OperatorWindow>(new ConstructorArgument("operatorId", userId)); //_ninjectKernel.Get<OperatorWindow>(); break; case UserRole.SecurityServiceEmployee: window.Content = _ninjectKernel.Get <SecurityOfficerPage>(new ConstructorArgument("userId", userId)); break; } }