سلام دوستان
آقا ما یه مشکل بزرگ داریم. عکسارو ببینید:







قضیه از این قراره از طریف اون کمبو باکس ما اسم طرف رو می گیریم و تو صفحات دیگه می تونیم بقیه مشخصاتشو ببینیم و ویرایش کنیم. حالا من فقط می تونم اسمشو تو صفحات دیگه نشون بدم و نمیتونم بقیه اطلاعات رو از دیتابیسم بگیرم و بیارم اینجا. میشه کمک کنید؟!!!

C#‎
VS2005
sql2000

اینم کدها به ترتیب عکس:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


namespace PortalMade181
{

public partial class EtelaateAvaliye : Form
{


public EtelaateAvaliye()
{

InitializeComponent();
}

private void EtelaateAvaliye_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'portal181DataSet1.tb1' table. You can move, or remove it, as needed.
// this.tb1TableAdapter.Fill(this.portal181DataSet1.t b1);
// TODO: This line of code loads data into the 'portal181DataSet.tb' table. You can move, or remove it, as needed.
// this.tbTableAdapter.Fill(this.portal181DataSet.tb) ;


SqlConnection cnn = new SqlConnection("Data Source=.;Initial Catalog=Portal181;Integrated Security=True");
cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from tb1", cnn);
DataSet ds = new DataSet();
da.Fill(ds, "tb1");
comboBox1.DataSource = ds.Tables["tb1"];
comboBox1.DisplayMember = "kelasse";
comboBox1.ValueMember = "kelasse";


}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection cnn = new SqlConnection("Data Source=.;Initial Catalog=Portal181;Integrated Security=True");
cnn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = cnn;
cmd.CommandText = "select * from tb1 where kelasse=" + Convert.ToInt32(comboBox1.Text);
SqlDataReader sdr = cmd.ExecuteReader();
sdr.Read();
if (sdr.HasRows)
{

toolStripStatusLabel1.Text = sdr.GetString(1);
label8.Text = sdr.GetString(1);
label8.Visible = true;
// label10.Text = sdr.GetString(2);
// label11.Text = sdr.GetString(3);
// label12.Text = sdr.GetString(4);
// label13.Text = sdr.GetString(5);
// label14.Text = sdr.GetString(6);
// label15.Text = sdr.GetString(7);
// label16.Text = sdr.GetString(8);
// label17.Text = sdr.GetString(9);
// label18.Text = sdr.GetString(10);
// label19.Text = sdr.GetString(11);
// label20.Text = sdr.GetString(12);
// label21.Text = sdr.GetString(13);
// label22.Text = sdr.GetString(14);
// label23.Text = sdr.GetString(15);


}
else
{
MessageBox.Show("Not Found");
}

}




private void pictureBox2_Click(object sender, EventArgs e)
{
Form1 form = new Form1();

form.Show();
}

private void button1_Click(object sender, EventArgs e)
{
// SqlConnection myCon = new SqlConnection("Data Source=.;Initial Catalog=Portal181;Integrated Security=True");
// myCon.Open();
// string sql;
// Search Family
// sql = "SELECT c_Family + ' , ' + c_Name AS Expr1 FROM Countact WHERE (c_Family LIKE N'%" + text + "%') ORDER BY c_Family + c_Name";
// SqlCommand myCom = new SqlCommand(sql, myCon);
// SqlDataReader myDR;
// // myDR = myCom.ExecuteReader();
// lstFamily.Items.Clear();
// while(myDR.Read())
// lstFamily.Items.Add(myDR.GetValue(0).ToString());
// myDR.Dispose();
// myCom.Dispose();
//Search Name
// sql = "SELECT kelasse FROM tb1 WHERE (kelasse LIKE N'%" + textBox1.Text + "%')";
// SqlCommand myComName = new SqlCommand(sql, myCon);
// SqlDataReader myDRName;
// myDRName = myComName.ExecuteReader();
// textbox1.Items.Clear();
// while (myDRName.Read())
// textbox1.Items.Add(myDRName.GetValue(1).ToString() );
// myDRName.Dispose();
// myComName.Dispose();
// myCon.Close();
// myCon.Dispose();
}

private void textBox1_TextChanged(object sender, EventArgs e)
{

// myDataBase.Search( kelasse, txtFamily.Text);
}

private void pictureBox3_Click(object sender, EventArgs e)
{
Ejraye181 EJR = new Ejraye181(label8.Text);

}

private void pictureBox8_Click(object sender, EventArgs e)
{
NamayeshDB ndb = new NamayeshDB();
ndb.Show();

}

private void pictureBox1_Click(object sender, EventArgs e)
{
EtelaAteAvaliye1 et1 = new EtelaAteAvaliye1(label8.Text);

}



}

}

--------------------------------



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace PortalMade181
{
public partial class EtelaAteAvaliye1 : Form
{
public EtelaAteAvaliye1(string str)
{
InitializeComponent();
this.textBox1.Text = str;
// this.textBox2.Text = str;
this.ShowDialog();
}

private void pictureBox2_Click(object sender, EventArgs e)
{
Form1 form = new Form1();
Hide();
form.Show();
}

private void pictureBox3_Click(object sender, EventArgs e)
{
EtelaateAvaliye ETa = new EtelaateAvaliye();
Hide();
ETa.Show();
}

private void button1_Click(object sender, EventArgs e)
{





// if (txtUFirstName.Text.Length > 0 && txtULastName.Text.Length > 0)
// {
// string cnStr = "Data Source = " + System.Net.Dns.GetHostName() + ";Initial Catalog = Northwind;;Integrated Security = true";
// if (DB.dbConnected(cnStr))
// {
// DB myDB = new DB();
// string updCmd = "Update Employees set LastName ='" + txtULastName.Text + "', FirstName ='" + txtUFirstName.Text + "' where EmployeeID ='" + EmpID +"'";
// MessageBox.Show(myDB.update(cnStr,updCmd));
// fillDgView();
// }
// else
// {
// MessageBox.Show("Connection failed." + Environment.NewLine + "Check your connection string.", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// }
// }
// else
// {
// MessageBox.Show("Information not complete.", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// }
}

private void textBox1_TextChanged(object sender, EventArgs e)
{

}

private void EtelaAteAvaliye1_Load(object sender, EventArgs e)
{
SqlConnection cnn = new SqlConnection("Data Source=.;Initial Catalog=Portal181;Integrated Security=True");
cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from tb1", cnn);
DataSet ds = new DataSet();
da.Fill(ds, "tb1");
// SqlDataReader sdr = cmd.ExecuteReader();
// sdr.Read();

}

}
}
--------------------------



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PortalMade181
{
public partial class Ejraye181 : Form
{
public Ejraye181(string str)
{
InitializeComponent();
this.label30.Text = str;

this.ShowDialog();

}

private void Ejraye181_Load(object sender, EventArgs e)
{



}

private void textBox7_TextChanged(object sender, EventArgs e)
{


}

}
}