use of SMExceptions.SMException in project SmartCity-Market by TechnionYP5777.
the class CustomerLoginScreen method guestLoginButtonPressed.
@FXML
private void guestLoginButtonPressed(ActionEvent __) {
ICustomer customer = InjectionFactory.getInstance(Customer.class);
try {
customer.login(guestLogin.getUserName(), guestLogin.getUserName(), true);
} catch (SMException e) {
log.fatal(e);
log.debug(StackTraceUtil.getStackTrace(e));
e.showInfoToUser();
return;
} catch (Exception e) {
DialogMessagesService.showErrorDialog(e + "", null, "");
return;
}
TempCustomerPassingData.customer = customer;
AbstractApplicationScreen.setScene("/CustomerMainScreen/CustomerMainScreen.fxml");
}
use of SMExceptions.SMException in project SmartCity-Market by TechnionYP5777.
the class CustomerRegistration_IngredientsScreen method updateIngredientsCheckList.
private void updateIngredientsCheckList() {
ICustomer customer = InjectionFactory.getInstance(Customer.class);
try {
ingredientsObservableList.addAll(customer.getAllIngredients());
} catch (SMException e) {
log.fatal(e);
log.debug(StackTraceUtil.getStackTrace(e));
e.showInfoToUser();
}
ingredientsCheckListView.setItems(ingredientsObservableList);
HashSet<Ingredient> currentAllergans = TempCustomerProfilePassingData.customerProfile.getAllergens();
if (currentAllergans != null && !currentAllergans.isEmpty())
updateListViewWithChosenIngreidients(currentAllergans);
}
Aggregations