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. Advertisements

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:
    566
    Ruslan
    Sep 11, 2003
  2. =?Utf-8?B?eno=?=
    Replies:
    2
    Views:
    830
    =?Utf-8?B?eno=?=
    Aug 9, 2004
  3. norm

    refresh schema in designer

    norm, Mar 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,897
  4. Oleg
    Replies:
    1
    Views:
    702
    Mike Treseler
    Mar 7, 2004
  5. Wolfgang Fallot-Burghardt

    Analog/Mixed-Signal ASIC Designer for contract in Germany

    Wolfgang Fallot-Burghardt, Mar 27, 2005, in forum: VHDL
    Replies:
    0
    Views:
    734
    Wolfgang Fallot-Burghardt
    Mar 27, 2005
  6. Steve B.
    Replies:
    4
    Views:
    1,208
    Cheryl D Wise
    Jun 1, 2007
  7. Alexander Higgins
    Replies:
    3
    Views:
    1,285
    Teemu Keiski
    Jul 30, 2007
  8. Alexander Higgins
    Replies:
    0
    Views:
    615
    Alexander Higgins
    Jul 21, 2007
Loading...