BlackOps
December 17th, 2007, 01:39 AM
Hello, i have simple database application, which shows data from database file. Now i want implement feature of finding by Name.. i have added new SQL statement to XSD schema...its ok..
now i have added new item - Form2. to the dialog. there is textBox1 on it. OK, and Cancel buttons.
now i want to activate this dialog, and type any name there...click OK, and after this it will show all records with this name. but problem is, from the Form1.cs it doesnt see a textBox1... cuz textBox1 is on the Form2.cs
here is the code:
private void form2ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 myForm = new Form2();
if (myForm.ShowDialog() == DialogResult.OK)
{
// extract the data from the dialog
//MessageBox.Show(myForm.Name + " was entered into the database");
this.e_employeesTableAdapter.FillByName(this.swsDataSet.e_employees,);
}
}
what do i have to write down after this.swsDataSet.e_employees.... ?
thanks
now i have added new item - Form2. to the dialog. there is textBox1 on it. OK, and Cancel buttons.
now i want to activate this dialog, and type any name there...click OK, and after this it will show all records with this name. but problem is, from the Form1.cs it doesnt see a textBox1... cuz textBox1 is on the Form2.cs
here is the code:
private void form2ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 myForm = new Form2();
if (myForm.ShowDialog() == DialogResult.OK)
{
// extract the data from the dialog
//MessageBox.Show(myForm.Name + " was entered into the database");
this.e_employeesTableAdapter.FillByName(this.swsDataSet.e_employees,);
}
}
what do i have to write down after this.swsDataSet.e_employees.... ?
thanks