How to save grouped multiple checkboxes into database in asp.net core - nested-checkboxes

how can I save values of checkboxes for each user as against the many checked boxes

Related

How to Keep record id in visualforce?

I just tackle with one scenario in which i want to maintain a particular record id information throughout the different tab in salesforce org.In this when i select a particular record in jqgrid using radio button all the information related to that record must be fetch in other visualforce tab.The table have different relationship with other table.

Form for many to many relationship in MVC

On an MVC view I need to display a form to insert user data and its courses.
For each course the user must choose: name, number of days and location.
And the user can choose many courses ... I don't know how many.
So basically this a form with a many to many relationship.
What options do I have for such a form that is easy to use?
You should have some entry points like a user or a course to view its details. For example, if you go to details of a user, you can see all the registered courses in a table/grid, you can have an autocomplete dropdown box for adding a new course. You can apply the same thing for a course details page as well.

Core Data entity design for master-detail interface

I am developing an app with a master-detail interface which displays a list of products that the user can drill down into. On initialisation, the app loads summary information for (1000+) products from a web service and displays it in a table view. When the user selects a particular product, the app calls the web service to get detailed info for that product and displays it in a detail view.
I want to persist this data between sessions using the Core Data framework.
I can think of two approaches for modelling this data.
Use a single Core Data entity Product containing all attributes for this object. When the table view is initialised these entities are populated with summary data. When a particular product is selected, the remaining fields are populated for that product only.
Use two Core Data entities, ProductSummary and ProductDetail with a summary/detail relationship between them. ProductSummary contains the attributes that are loaded by the table view. ProductDetail contains the attributes loaded by the detail view.
What are the pros and cons of each option? Option 1 certainly looks easier to code, but am I storing up memory usage problems for later? Would performance be equivalent?
With as many objects as you are going to have, go with option 2. Keep the data coming in and the attributes of the entity down to only what you need to display in the TV. Set up the relationship to detail and load that when the detail VC comes in.
I am doing something similar except with ~4500 rows. I only store what I need and then turn to the other entity for detail relating to the object.

Keep some information between different "new" forms

I have a form where the user can choose options from a lot of select boxes. The form is used to register several items from an RSS feed. The user fills in the form, clicks create and is presented with the same form for the next item in the list.
Sometimes, the same options are valid for several items in the list, and I would like to be able to save some of the selections done so the user doesn't have to make the same selection for the next items.
What is the best way of doing this? I've identified four ways of doing it:
Sessions
Just keep the values in the session hash. This will of course work and is very simple, but I have some undefined feeling that it is a bad idea. It will also not work if the user is using the form from different tabs in the browser.
Cookies
Basically the same as keeping them in the session, I think.
Profile
Can't be done in this case I believe, since profiles are shared between several users.
Database
The most complex way I've come up with is to keep the information in the database and use a query parameter to keep track of which information should be used. This is probably overkill, but in some ways the best way to me. I don't like the idea of keeping this kind of state in session or cookies.
Am I missing some way? Or something?
If after filling first form, some data is saved to db (object is created) then you can use this data from db to fill up new form.
If after filling first form, nothing is saved to db, then you can create in memory some objects based on params from previous post and based on this (on just on params) you can prepare new form. But of course data from previous form should be added as hidden fields in second form.

Document User Interface using QuantumGrid (TcxGrid) from Developer Express

I need to generate a user interface for entering a sales document (eg invoice). I'm trying to use components of "developer express" specifically the QuantumGrid component (TcxGrid). I've seen the demos of master-detail components and search in the devexpress support center, but none has helped me because all use 2 grids to handle the master-detail relation, and edit multiple records at once.
I just need to edit a record (document) at a time and using a pair of objects dataware components (eg TDBEdit) in the header and a grid to handle the detail.
something like this
Where can I find a basic example of using these components in this way?
Tthe Master/Child properties in the QuantumGrid are mainly designed to nest multiple items in the grid. If you setup the relationship in the data components you can simply hook the controls up to the correct DataSource and everything will work.
So if you have two DataSets Customer and Invoice. The Invoice Master Datasource is the Customer DataSource. Then on your edit controls you point to the Customer DataSource and you point the Grid to the Invoice DataSource.
If you think about what the Master/Detail relationship is doing it really just filters the records on the Detail DataSet to match the current record on the Master DataSet. Individual Edit controls will always display the "current" record in the DataSet they are connected to. Grids will show all visible records in the DataSet they are connected to.
I have a tendency to not use Master/Detail relationships in an edit form like you show here. I'm assuming there is some way on a different screen to pick the invoice to edit. I usually create a copy of the needed DataSets with only the records needed for this edit. If I am editing a existing invoice I copy the current records. If it is a new invoice I can start off with an empty recordset. It is more work - I have some generic library functions that will copy a DataSet Structure and then copy one or more records into that Dataset. Depending on your setup you can also requery your Database to just get the records you are interested in. Obviously that should not be done in all cases. Another issue with this approach is you need a way to update any other Datasets you may have with this data - i.e. your main search screen.
However, once I get on the edit screen I find it makes things eaiser. Now I don't need to worry about the master detail relationship at the top level. If the invoice has internal Master/Detail relationships you can just deal with those, but you know that the DataSets only have the data for this one invoice - not everything in the Database.
In the case of your form if you limit the Data in the DataSets you can just hook everything up directly and it should work as you expect. You would only have one record in the Customer DataSet and the invoice would just have the records for this Invoice.
I think you'll need to take care of the master-detail relations in your ClientDataSource components. The grid will then follow this relation.
Why don't you ask this at support#devexpress.com ?
The reason why I have a vcl subscription is, apart from the quality of the components of course, because they do have a great support site and staff ?
There you ask it directly to the people who have written the stuff, and they are most likely happy to supply you with a sample program (at least I have received a lot of samples over the years).
The premise is the same as with any other master-detail relationship, regardless of the components. You will need to setup the master-detail on the dataset level to accomplish what you want.

Resources