コード例 #1
0
        private void CmbİsciBriqada_SelectedIndexChanged(object sender, EventArgs e)
        {
            CmbIsciSoyad.ResetText();
            CmbIsciSoyad.Items.Clear();
            CmbIsciAd.ResetText();
            CmbIsciAd.Items.Clear();
            elaqe.Open();
            string        query2  = " select Ad,Soyad from Isci_Info where Temir_briqadasi='" + CmbIsciBriqada.Text + "'";
            SqlCommand    cmd2    = new SqlCommand(query2, elaqe);
            SqlDataReader reader2 = cmd2.ExecuteReader();

            while (reader2.Read())
            {
                CmbIsciAd.Items.Add(reader2.GetString(0));
                CmbIsciSoyad.Items.Add(reader2.GetString(1));
            }
            elaqe.Close();
        }
コード例 #2
0
        private void CmbIsciAd_SelectedIndexChanged(object sender, EventArgs e)
        {
            CmbIsciSoyad.Items.Clear();
            CmbIsciSoyad.ResetText();
            string newAd = CmbIsciAd.Text;

            newAd = newAd.Replace("ə", "%");
            newAd = newAd.Replace("ı", "%");
            newAd = newAd.Replace("ö", "%");
            newAd = newAd.Replace("ü", "%");
            newAd = newAd.Replace("ğ", "%");

            elaqe.Open();

            string        query2  = " select * from Isci_Info where Ad like '" + newAd + "' and Temir_briqadasi='" + CmbIsciBriqada.Text + "'";
            SqlCommand    cmd2    = new SqlCommand(query2, elaqe);
            SqlDataReader reader2 = cmd2.ExecuteReader();

            while (reader2.Read())
            {
                CmbIsciSoyad.Items.Add(reader2.GetString(2));
            }
            elaqe.Close();
        }