Click here to Skip to main content
15,904,415 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
1) I have create one form in window application. the text box contains time and one combo box for AM and PM user will put the time and then he will select AM or PM but i am not understanding how i put this both in sql server and don't understand how do i join them.
==============================================================================
2) i have taken one group box in that i have put three text box and three label means one row contains six info.
i want to do sql connection on text box so that if user put info in the text and it should retrieve the data in the labels.

==============================================================================
3) In the group box i have put one add button i want that if user click on Add button next row should be visible in group box. i have have made all the text box and label enable = false.
i have wrote the code for it but it is giving me error here is the code

C#
private void button2_Click(object sender, EventArgs e)
        {
        //  frmsalesorderbooking f2 = new frmsalesorderbooking();
        ////    groupBox1 gb = new GroupBox1();
        //  int topPosition = 5;
        //  for (int j = 0; j < Convert.ToInt32(textBox6.Text.ToString()); j++)
        //  {
        //      comboBox2 cb = new ComboBox1();
        //      cb.left = 5;
        //      cb.top = topPosition;
        //      topPosition += 30;
        //      gb.controls.Add(cb);
        //  }
        //  frmsalesorderbooking.Control.Add(gb);
        //  frmsalesorderbooking.show();
            if (Visible == false)
            {
                textBox14.Visible = true;
                textBox18.Visible = true;
                textBox27.Visible = true;
            }



please help me i hope i have made it clear what i want please help


thanks in advance :rose::rose::rose:
Posted
Updated 18-Oct-10 21:31pm
v3
Comments
Smithers-Jones 19-Oct-10 3:24am    
Aarti, you are long enough here to know, that "help me please" is not a meaningful subject line for a question.

1 solution

1. what is the error in the code?
2.
frmsalesorderbooking.Control.Add(gb);

This line should be raising error as you cannot modify class, use object instead which is
f2
here.
 
Share this answer
 
v2
Comments
aayu 19-Oct-10 3:28am    
thats y i have kept that code as comment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900