PC Review


Reply
Thread Tools Rate Thread

DataSetExample.Designer.cs

 
 
Mario
Guest
Posts: n/a
 
      12th Jul 2010
If I have two tables:
Customer
ID
Name
Adress

and Orders
ID
IDCustomer (related with the Customer Name, because Customer ID wasn't
inserted yet, because both tables are inserted on the same page)
Product
Quantity
Price

I simply enter customer data through the TextBoxes and save data:
string sql = "INSERT ...";

using (

SqlConnection myConnection =

new
SqlConnection(ConfigurationManager.ConnectionStrings["BaseConnectionString"].ConnectionString))

{

......

myConnection.Open();

myCommand.ExecuteNonQuery();

myConnection.Close();


Order table deals through the ListView, ObjectDataSource and DataSet,
showing Product, Quantity and Price columns. ID column is automatic.
The problem is with IDCustomer column which needs to fill automatic,
according to a Customer ID. I was thinking that it will be easy to change
the DataSetExample.Designer.cs (generated by VS2008). I was thinking to
change Insert code by adding @IDCustomer as SQL Parameter and than read the
Name textbox, but texboxes are not available. Session variable is not
available too.
So, could you please suggest me the way to solve the problem
Thnx





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio Designer deleting necessary designer code Jason Microsoft C# .NET 4 24th Apr 2009 01:09 AM
Visual Studio DataSet designer doesn't regenerate designer.cs code Barney Microsoft C# .NET 3 15th Oct 2007 04:15 PM
Sharepoint Designer/ Expression Web Designer : adding item in toolbox ? Steve B. Microsoft ASP .NET 4 1st Jun 2007 05:29 AM
Add referenced data set to designer: Could not add an instance of prjData.dsMachineInfo to the designer. D Witherspoon Microsoft Dot NET 2 18th Mar 2005 01:28 PM
Add referenced data set to designer: Could not add an instance of prjData.dsMachineInfo to the designer. D Witherspoon Microsoft VB .NET 2 18th Mar 2005 01:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.