0
PROJECT ITEM ENTRY, MONITORING, and UPDATE
This is supposed to be a CRUD Operation but the update part is not working, I want to store a new value for a specific array without using an ArrayList. when I try CASE 2, it is all good. It displays the Updated information whenever I edited a value. but when I tried to get to CASE 3. the Updated Info didn't display, the original inputted values are the ones displayed. UPDATE PART - > Case2 and Case3 https://code.sololearn.com/c0y9lx7vecid
4 odpowiedzi
+ 1
You do not store updates in your arrays or ItemV2 objects. Your ItemV2 objects have the same name but they are not the same instance.
Look in this code the principle of using an entity
https://code.sololearn.com/cGn4mt4gxD0m/?ref=app
+ 1
On line 126, you add the old quantity by 0 but never by the one indicated by the user.
https://code.sololearn.com/cDsR0Fl5S8Y7/?ref=app
+ 1
Normally, if you update an entity, you should use it as a parameter of your method. It would simplify your code.
0
sir how about the display part on Case 3, when I update the values on case 2 and again try to display the updated values on Case3, it is still the display is the original not the updated version