Exemple #1
0
 private void CariiptalTusu_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < MusteriSecmeYeri.Rows.Count - 1; i++) //hata alirsan "dataGridinIsmi.Rows.Count -1" yap
     {
         if (MusteriSecmeYeri.Rows[i].Cells[0].Value.ToString() == MusteriAramaYeri.Text)
         {
             mustericariodeformu = new MusteriCariOdeUfakEkrani();
             ad   = MusteriSecmeYeri.Rows[i].Cells[0].Value.ToString();
             cari = MusteriSecmeYeri.Rows[i].Cells[1].Value.ToString();
             mustericariodeformu.cariodemusteriadi.Text    = ad;
             mustericariodeformu.cariodemustericarisi.Text = cari;
             mustericariodeformu.yenimusteriadi.Text       = ad;
             mustericariodeformu.Show();
             this.Close();
         }
     }
 }
Exemple #2
0
 private void MusteriAramaYeri_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData.ToString() == "Return")
     {
         for (int i = 0; i < MusteriSecmeYeri.Rows.Count - 1; i++) //hata alirsan "dataGridinIsmi.Rows.Count -1" yap
         {
             if (MusteriSecmeYeri.Rows[i].Cells[0].Value.ToString() == MusteriAramaYeri.Text)
             {
                 mustericariodeformu = new MusteriCariOdeUfakEkrani();
                 ad   = MusteriSecmeYeri.Rows[i].Cells[0].Value.ToString();
                 cari = MusteriSecmeYeri.Rows[i].Cells[1].Value.ToString();
                 mustericariodeformu.cariodemusteriadi.Text    = ad;
                 mustericariodeformu.cariodemustericarisi.Text = cari;
                 mustericariodeformu.yenimusteriadi.Text       = ad;
                 mustericariodeformu.Show();
                 this.Close();
             }
         }
     }
     else if (e.KeyData.ToString() == "Esc")
     {
         MusteriAramaYeri.Text = "";
     }
 }