Merge branch 'master' of https://xp-dev.com/git/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / AccountManager.java
index ae57126..626038f 100644 (file)
@@ -43,9 +43,15 @@ public class AccountManager extends UnicastRemoteObject implements AccountInterf
                
        }
        
-       public boolean removeAccount(Account ac)throws RemoteException {
-               if(this.dbMngr.removeAccount(ac))
-                       return true;
+       public boolean removeAccount(int index)throws RemoteException {
+               OwnerManager own = new OwnerManager();
+               try {
+                       if(this.dbMngr.removeAccount(own.getOwners().get(index)))
+                               return true;
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
                return false;
                
        }