ASP.NET MVC Master Detail Entry Form

后端 未结 6 1208
野趣味
野趣味 2021-01-30 18:02

I’m trying to implement an order entry form using ASP.NET MVC but facing a lot of difficulties. All the samples that I found are related to viewing master detail forms, and non

6条回答
  •  野的像风
    2021-01-30 18:56

    Just off the top of my head (a kind of brain dump)...

    • You could have a main grid part of the form. This would be full view loaded from an action (either with an order number or not depending on loading an existing one or not).

    • When clicking an event (new or edit) this could open a partial view in a "lightbox" style. This would then pass back a json object back to the main form.

    • The passed json object would then be rendered using templating to the bottom of the table (for a new one) or update an existing record. This could also be saved back to the server in the same ajax call. Or just update the client side and need the user to click a save button.

    • An isDirty flag will be needed so any changes set it to true and the when the browser tries to leave or close etc. then you can prompt the user to save or not.

    Hope this helps.

    edit

    Not tried this but could be interesting with the none db aspect of your question click

提交回复
热议问题