DataSetExample.Designer.cs

Discussion in 'ASP .Net' started by Mario, Jul 12, 2010.

  1. Mario

    Mario Guest

    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
     
    Mario, Jul 12, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ruslan

    Menu Designer

    Ruslan, Sep 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    508
    Ruslan
    Sep 11, 2003
  2. =?Utf-8?B?eno=?=
    Replies:
    2
    Views:
    733
    =?Utf-8?B?eno=?=
    Aug 9, 2004
  3. Steve B.
    Replies:
    4
    Views:
    1,001
    Cheryl D Wise
    Jun 1, 2007
  4. Alexander Higgins
    Replies:
    3
    Views:
    1,111
    Teemu Keiski
    Jul 30, 2007
  5. Alexander Higgins
    Replies:
    0
    Views:
    470
    Alexander Higgins
    Jul 21, 2007
Loading...

Share This Page