C# Passing data between forms

Discussion in 'C#' started by gambit_1607, Feb 9, 2010.

  1. gambit_1607

    gambit_1607 New Member

    Joined:
    Feb 9, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hello. i have problem with c# multiple form app. in my first form i have a combo box, a list, a text box and an add item button. in the combo box i have a list of products. once i choose a product from combo box and enter the quantity in the text box, it will show up on my list. but if i click on an empty string from combo box such as "" and click on add item, it will take me to a subform where i can put in the specifications of the product. in the second form i have the product name and other specifications. i also have an update button when the name of the product in the second form's text box is entered and update button is clicked, it should upload the name of the product to the first form's combo box.





    ...continued below
     
  2. gambit_1607

    gambit_1607 New Member

    Joined:
    Feb 9, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    usually when u want to pass data u have the driver class, there u create an object of the first form and once in the first form, u create an object of the second form and pass the first form's values into the second form. but in this case its different. you are creating an object of the first form in the driver class. then once the user is in the first form and clicks add item for a blank string in the combo box, an object of the second form is created. once product name is entered into the second form and the update button is clicked the data has to be passed back to the first form. so it is back and forth.

    here is my code

    please follow this link nexusfactor.webs.com/Lab.rar

    THANK YOU A LOT IN ADVANCE!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice