Wrox Programmer Forums
|
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2014, 10:07 AM
Friend of Wrox
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Default Add / Edit plans with custom fields

Hello all,
I am trying to add plans with cusotm fields. So I have 2 tables for this
1. Plans 2. CustomFields
In the UI part I have basic information for plans table like (Name, Description) and other part is for custom fileds which is Name & Value.
Now when a plan will be saved then all custom fields will be saved for that plan in CustomFields table.
How I can do this in one server hit.
How do I manage EDMX classes so that all work is done in one go.
I could do this in this manner,
On UI, first send request to add plan, and get inserted plan id. Then make another request with plan id in hand and name, value collection of custom fields.
But I do not want to do this way, all I want is save all data in one go.
Second thing,
When editing a specific plan, I do not want to delete all associated custom fields with plan and then re add them. If any of the custom field is deleted from UI only then it
should be deleted from DB, otherwise not.In other case it (custom field) should just be updated.
Please tell me how it can be done in the requested way.
(I do not like the way I've been following to do such operations, so please tell me with code samples how I can achieve this in requested way.)
Many thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabs + Subforms + Add/Edit = No Go hkmulligan Access 5 August 10th, 2007 06:54 AM
custom format of fields barmanvarn BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 May 22nd, 2006 11:24 AM
how to know who edit or add records? drachx General .NET 1 October 13th, 2004 05:36 AM
how to know who edit add records? drachx SQL Server 2000 9 October 13th, 2004 04:28 AM
Given the datalist. How do I add edit mode? macupryk General .NET 0 October 8th, 2004 12:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.