use of CommonDefs.CLIENT_TYPE in project SmartCity-Market by TechnionYP5777.
the class EmployeeLoginScreen method loginButtonPressed.
@FXML
private void loginButtonPressed(ActionEvent __) {
if (loginButton.isDisable())
return;
IManager employee = InjectionFactory.getInstance(Manager.class);
CLIENT_TYPE employeeType = null;
try {
employeeType = employee.login(userNameTextField.getText(), passwordField.getText(), true);
} catch (SMException e) {
log.fatal(e);
log.debug(StackTraceUtil.getStackTrace(e));
e.showInfoToUser();
return;
}
InjectionFactory.getInstance(EmployeeScreensParameterService.class).setClientType(employeeType);
AbstractApplicationScreen.setScene("/EmployeeMenuScreen/EmployeeMenuScreen.fxml");
}
Aggregations