projects
/
RRRRHHHH_Code
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DeleteOffers and Modify Offers completed, both logic and GUI
[RRRRHHHH_Code]
/
ruralHouses
/
src
/
businessLogic
/
OfferManager.java
diff --git
a/ruralHouses/src/businessLogic/OfferManager.java
b/ruralHouses/src/businessLogic/OfferManager.java
index
6d35620
..
c286a40
100644
(file)
--- a/
ruralHouses/src/businessLogic/OfferManager.java
+++ b/
ruralHouses/src/businessLogic/OfferManager.java
@@
-66,7
+66,10
@@
public final class OfferManager {
if (firstDay.compareTo(lastDay)>=0) throw new BadDates();
boolean b = dbMngr.existsOverlappingOffer(ruralHouse,firstDay,lastDay); // The ruralHouse object in the client may not be updated
if (firstDay.compareTo(lastDay)>=0) throw new BadDates();
boolean b = dbMngr.existsOverlappingOffer(ruralHouse,firstDay,lastDay); // The ruralHouse object in the client may not be updated
- if (!b) return dbMngr.createOffer(ruralHouse,firstDay,lastDay,price);
+ if (!b) {
+ ruralHouse.createOffer(offerNumber, firstDay, lastDay, price);
+ return dbMngr.createOffer(ruralHouse,firstDay,lastDay,price);
+ }
return null;
}
return null;
}