Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am doing software in which I have the typical CRUD operations.
I have to make the Edit or Modify screen.
The problem is the following:I have Data that corresponds to the header, and I have two grids to which you can add or remove rows. The data of these grids are related to the header, which is the main table.
the Edit screen shows the header and the two grid with all the preloaded data, so that the user can modify if you want header data and add or remove Rows of grids. In the screen at the end there are two buttons, SAVE AND CANCEL.
Strategies 1: if the user add or remove rows in the grids. Then when the user presses the Save button, the data in the header is saved easily, BUT WHAT TO DO WITH THE GRIDS?. I HAVE TO DELETE ALL THE DATA ASSOCIATED WITH EACH GRID IN THE DATABASE AND SAVE AGAIN WHAT THE GRIDS HAVE IN THE MODIFICATION ???
Strategy 2: That the header data is save when you click the SAVE button, but the grid data is reflected in the database directly when added and removed from the list ??? the SAVE button will only serve for the data in the header because the actions on the grids hit directly into the database.

What is the strategy most used in these cases ??? Thank you.

What I have tried:

I didnt do it anything up to now, because i want to know what is the best strategy to make this screen
Posted
Updated 4-Mar-17 15:36pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900