13-07-19, 12:19 AM
(12-07-19, 11:13 PM)asemshahen5 كتب : عدل هذا الكود ليصبح :
PHP كود :
private void textBox1_TextChanged(object sender, EventArgs e)
{
DataTable QDt = new DataTable();
QDt.Clear();
cmd = new SqlCommand("select NAME_OF_CONTRACTOR from CONTRACTORS where PROJECT_NUMBER ='" + comboBox2.Text.ToString() + "'", sqlcon);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(QDt);
if (comboBox3.Items.Count > 0)
{
comboBox3.Items.Clear();
}
if (QDt.Rows.Count > 0)
{
comboBox3.Items.Add("");
foreach (DataRow str in QDt.Rows)
{
comboBox3.Items.Add(str[0].ToString());
}
}
}
والله ما فيه كلام يوصفك يا غالي
غلبتك معايا ودوشتك قوي انا
بجد الف مليون شكر ليك
