X-Git-Url: https://xp-dev.com/git/RRRRHHHH_Code/blobdiff_plain/7999499eee1fc932aeef9a813206d37313d7a753..578bec184aad79cdf233d774c8f574c9de8438b8:/ruralHouses/src/businessLogic/AccountManager.java diff --git a/ruralHouses/src/businessLogic/AccountManager.java b/ruralHouses/src/businessLogic/AccountManager.java index 3f0bc5b..3747973 100644 --- a/ruralHouses/src/businessLogic/AccountManager.java +++ b/ruralHouses/src/businessLogic/AccountManager.java @@ -8,6 +8,7 @@ import javax.mail.MessagingException; import common.AccountInterface; import dataAccess.DB4oManager; import domain.Account; +import domain.Administrator; public class AccountManager extends UnicastRemoteObject implements AccountInterface { @@ -27,7 +28,8 @@ public class AccountManager extends UnicastRemoteObject implements AccountInterf } } - public boolean addAccount(Account ac) throws RemoteException { + public boolean addAccount(int index) throws RemoteException { + Account ac = Administrator.getInstance().getNewOwnerRequest().get(index); if(this.dbMngr.addAccount(ac)){ try { MailManager.getInstance().Send(ac.getOwner().getMailAccount(), "Entered into the system", "Congratulations");