Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Winforms Data Entry - Using SProcs & Global Variables

$
0
0

All,

This will take a minute to explain what I am really needing so let me tell you what I am doing. Using VS2012 VB.NET 4.5 & SQL 2012 on Win7 machine. I reference connection string from App Settings rather than hard coding. 

I have a small application that when the user logs in there is a module that holds a few global variables about the user and project they are assigned. I need to make a "Proposal' form (master/detail) that is used in our estimating department. This Proposal form needs to have an auto increment number, since there may be several Proposals for one project. Basically I need to get the count of records for the proposal table assigned to the job and add 1 to the next ( I would use DCount in Access for this). 

I have built a DevExpress TreeList form that the user will pick materials from to add to the Proposal Details section. I have this built and ready.

Now, here is where I am. First Part - When the user creates a new proposal, I need to have the auto increment number plus concatenation of initials assigned (GV), the user that is logged in (GV), and project name (GV) to create the main record which in turn will return its ID Key. This needs to be done with stored procedures.

Second part - when the user selects materials from the pop-up modal form with TreeList & list box, I need to add the record from the list box.selected value to the Proposal Details table using the ID of the current main record.

Any help with this is highly appreciated. If this is a wrong approach please help steer to a preferred method.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>