src/main/java/edu/kit/informatik/pcc/webinterface/datamanagement/AccountDataManager.java
/**
     * This method sends a delete order for the account attribute to the ServerProxy.
     *
     * @return true on success false else
     */
This method sends a delete order for the account attribute to the ServerProxy.
@return true on success false else
This method sends a delete order for the account attribute to the ServerProxy . @return true on success false else
public static boolean deleteAccount(VaadinSession session) {
        Account account = (Account) session.getAttribute("account");
        String ret = ServerProxy.deleteAccount(account);
        switch (ret) {
            case WRONGACCOUNT:
                MessageBox.createInfo()
                        .withMessage(errors.getString("wrongAccount"))
                        .open();
                break;
            case SUCCESS:
                MessageBox.createInfo()
                        .withMessage(errors.getString("accountDeleted"))
                        .open();
                session.setAttribute("account", null);
                return true;
            case FAILURE:
            default:
                System.out.println(ret);
                MessageBox.createInfo()
                        .withMessage(errors.getString("deleteFail"))
                        .open();
                break;
        }
        return false;
    }
public static boolean deleteAccount ( VaadinSession session ) { Account account = ( Account ) session . getAttribute ( "account" ) ; String ret = ServerProxy . deleteAccount ( account ) ; switch ( ret ) { case WRONGACCOUNT : MessageBox . createInfo ( ) . withMessage ( errors . getString ( "wrongAccount" ) ) . open ( ) ; break ; case SUCCESS : MessageBox . createInfo ( ) . withMessage ( errors . getString ( "accountDeleted" ) ) . open ( ) ; session . setAttribute ( "account" , null ) ; return true ; case FAILURE : default : System . out . println ( ret ) ; MessageBox . createInfo ( ) . withMessage ( errors . getString ( "deleteFail" ) ) . open ( ) ; break ; } return false ; }
This method sends a delete order for the account attribute to the ServerProxy.
This method sends a delete order for the account attribute to the ServerProxy .