Reputation: 1
I have a pre registering system with these tables:
After creating a login using a stored procedure I need to show the courses that are related to a particular dep id
. I did it. After that I needed students to be able to choose every course and then add it to a table and this is where the problems began...
I have two kinds of buttons. One of them is Registered Completely
it means user never can go back and changes the courses (I did it) but the second one is Registered Incompletely
it means user can go back and see what he/she chose and then uncheck it or check something else.
---> I want to do this in this way if he/she go back I want to show them all courses that related to them with courses that they chose before I mean the checkbox that consisted of data that user checked in the first time. Also show courses that not have been checked yet. All of them in a one grid view.
Please help me. I do everything that my lecture needs but this part that i try to solve it is a little tricky. I used to session and then save the index of the grid view that user checked and then insert it to database but you know more than 20 units user can choose and how do it please explain it with complete code.
Upvotes: 0
Views: 108
Reputation: 63105
in Registered Incompletely
scenario you need to save selected courses, user and flag with Registered Incompletely
. Then any time same user logged in or go back you can load all the courses and mark the selected courses based on previous saved data. if user is Registered Completely
then you can save Registered Completely
flag and user details in the database.
Edit:
students and registration complete status need to saved on database, here you can have Boolean value for that. true for complete, false for incomplete. if you have several pages to select courses, then in each page when you move next, save current courses selection in the database. it can be used when you want.
Upvotes: 1