how do i store values temporarily
-
What i am doing is my application has opportunity section, where we add new opportunity from clients if they are going to buy some products in the future. I need to store manufactuerid, some amount entered in textbox, some text entered in textboxes and some values selected from dropdowns. i want to add another set of same thing and store them temporarily until i store the main opportunity details after which i get the ID of the opportunity with which i can add manufacturers and other details selected before adding the opportunity. I am using one table to add these manufacturer details, and another table for opportunity details. So is there a mechanism where i can store multiples of details temporarily and save them after saving the main details only then i will get the iD using this id i want to store temporary values that i have captured into a table thank you,
-
What i am doing is my application has opportunity section, where we add new opportunity from clients if they are going to buy some products in the future. I need to store manufactuerid, some amount entered in textbox, some text entered in textboxes and some values selected from dropdowns. i want to add another set of same thing and store them temporarily until i store the main opportunity details after which i get the ID of the opportunity with which i can add manufacturers and other details selected before adding the opportunity. I am using one table to add these manufacturer details, and another table for opportunity details. So is there a mechanism where i can store multiples of details temporarily and save them after saving the main details only then i will get the iD using this id i want to store temporary values that i have captured into a table thank you,
It depends how temporary you want to be. If you want stuff in memory within your app then create a collection and stick your objects in there. If its a web app maybe you need to create an "InProgress" table in the DB. If it's a remote client like a sales laptop maybe you can save an XML file to disk. There are always thousands of solutions to these problems and you need to work out the best one for your task. Is your database creating the IDs? If it is I would be tempted to get the clients to create the IDs using GUID.NewGUID(); and use the same GUID for all the linked records. The ID that the customer sees does not have to be the same ID that links the table. GUIDs aren't everyone's cup of tea though; I'm sure there have been a fair few conversations on code project in the past about using them. HTH Russell
-
What i am doing is my application has opportunity section, where we add new opportunity from clients if they are going to buy some products in the future. I need to store manufactuerid, some amount entered in textbox, some text entered in textboxes and some values selected from dropdowns. i want to add another set of same thing and store them temporarily until i store the main opportunity details after which i get the ID of the opportunity with which i can add manufacturers and other details selected before adding the opportunity. I am using one table to add these manufacturer details, and another table for opportunity details. So is there a mechanism where i can store multiples of details temporarily and save them after saving the main details only then i will get the iD using this id i want to store temporary values that i have captured into a table thank you,
The best way to go about is create your own Types. In your case it will be "manufacturer" and "opportunity" Types with their respective details. Then create any required number of instances of these Types and fill them with values. Regards, Bhupi Bhai.
-
The best way to go about is create your own Types. In your case it will be "manufacturer" and "opportunity" Types with their respective details. Then create any required number of instances of these Types and fill them with values. Regards, Bhupi Bhai.
this is like i need to add opportunity line items in a different table. i have two tables one is Opportunity, another is opportunitymanufacturers following are the columns of Opportunity opportunityid name clientid description status timeframedue 1 ibmproje 25 need desktops won 12-02-2007 2 ibmproje 25 need desktops won 12-02-2007 3 ibmproje 25 need desktops won 12-02-2007 following are the columns of opportunitymanufacturers id opportunityid manufacturerID categoryname vendorcatgrycode qtyrequired amountworth timefram 1 1 15 workstations pl 20 $100000 12-02-2007 1 2 15 monitors gl 100 $200000 12-02-2007 1 1 20 lasers pl 20 $300000 12-02-2007 1 1 33 workstations pl 20 $120000 12-02-2007 i am going to desing my webpage which will accept the name, cliename from the dropdown,description from the textbox,status dropdown and timefame, and i have manufacturer dropdown on selectedindex change i have to populate categorynames on selected index changed i want populate correpsoning vendorcategorycode automatically selected and i want to add two text boxes for qty, amount and datepicker for the timeframe. user should be able to add multiples of manufacturer and category,qty etc details now the user adds the first table information and he comes to manufacter part of the opportunity when he comes to manufacturer sections he will select the first lot of manufacturer details, question is where should i add these 2nd table values, i cant add them to 2nd table yet becoz i dont have the opportunityID. i will get it only after saving the 1 table values. So i need to store the first lot of manufacturer details in the front enditself and show him what he added, and he should be able to add some more manufacturer details before he actually saves the entire opportunity. how do i do this? how do i keep manufacturer details temporarily in the front end itself add these temporary values as soon as i add 1st table values i get the opportunity id and i want to be able to read the manufacturer details which are in the temporary details to the 2nd table with opportunityID that i got after saving the 1st table values. please help me out in advisin