RRRRHHHH_Code
Diff Revisions
556478 ...
vs
e90cb4 ...
for ruralHouses/src/businessLogic/AccountManager.java
|
@@ -6,7 +6,6 @@ |
6 |
6 |
|
import javax.mail.MessagingException; |
7 |
7 |
|
|
8 |
8 |
|
import common.AccountInterface; |
9 |
|
- |
|
10 |
9 |
|
import dataAccess.DB4oManager; |
11 |
10 |
|
import domain.Account; |
12 |
11 |
|
import domain.Administrator; |
|
@@ -43,9 +42,15 @@ |
43 |
42 |
|
|
44 |
43 |
|
} |
45 |
44 |
|
|
46 |
|
- |
public boolean removeAccount(Account ac)throws RemoteException { |
47 |
|
- |
if(this.dbMngr.removeAccount(ac)) |
48 |
|
- |
return true; |
|
45 |
+ |
public boolean removeAccount(int index)throws RemoteException { |
|
46 |
+ |
OwnerManager own = new OwnerManager(); |
|
47 |
+ |
try { |
|
48 |
+ |
if(this.dbMngr.removeAccount(own.getOwners().get(index))) |
|
49 |
+ |
return true; |
|
50 |
+ |
} catch (Exception e) { |
|
51 |
+ |
// TODO Auto-generated catch block |
|
52 |
+ |
e.printStackTrace(); |
|
53 |
+ |
} |
49 |
54 |
|
return false; |
50 |
55 |
|
|
51 |
56 |
|
} |