Skip to content

Commit

Permalink
Little mistake with operation in ProcessOperation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoigs committed Dec 1, 2017
1 parent a3ce1b5 commit 6fa38f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BankClient/src/es/upm/dit/cnvr/server/ProcessOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ public void run() {
transaction = readData(op);
bc = transaction.getBankClient();

if (readData(op).equals(OperationEnum.CREATE_CLIENT)){
if (readData(op).getOperation().equals(OperationEnum.CREATE_CLIENT)){
db.createClient(bc);
operate.setPersonalCounter(operate.getPersonalCounter()+1);
}

if (readData(op).equals(OperationEnum.DELETE_CLIENT)){
if (readData(op).getOperation().equals(OperationEnum.DELETE_CLIENT)){
db.deleteClient(bc.getAccount(),bc.getClientName());
operate.setPersonalCounter(operate.getPersonalCounter()+1);
}

if (readData(op).equals(OperationEnum.UPDATE_CLIENT)){
if (readData(op).getOperation().equals(OperationEnum.UPDATE_CLIENT)){
db.update(bc.getAccount(), bc.getBalance());
operate.setPersonalCounter(operate.getPersonalCounter()+1);
}
Expand Down

0 comments on commit 6fa38f9

Please sign in to comment.