예제 #1
0
        private void Button5_Click(object sender, EventArgs e)
        {
            // Arama
            string sql = "SELECT * FROM URUN WHERE ADI LIKE '%'+@p1+'%' ";
            List <SqlParameter> prms = new List <SqlParameter>();
            SqlParameter        prm1 = new SqlParameter("@p1", "");

            prms.Add(prm1);

            FrmARAMA arama = new FrmARAMA(prms, sql, "URUN_REFNO");

            arama.ShowDialog();

            DataRow dr = dt.Rows.Find(FrmARAMA.REFNO);

            satir = dt.Rows.IndexOf(dr);

            KayitGetir(satir);
        }
        private void Button5_Click(object sender, EventArgs e)
        {
            // Arama
            string sql2 = "SELECT * FROM KULLANICI WHERE KULLANICI_ADI LIKE '%'+@p1+'%' OR DURUMU LIKE '%'+@p2+'%'";
            List <SqlParameter> prms = new List <SqlParameter>();
            SqlParameter        prm1 = new SqlParameter("@p1", "");
            SqlParameter        prm2 = new SqlParameter("@p2", "");

            prms.Add(prm1);
            prms.Add(prm2);

            FrmARAMA kullanara = new FrmARAMA(prms, sql2, "KULLANICI_REFNO");

            kullanara.ShowDialog();

            DataRow dr = dt.Rows.Find(FrmARAMA.REFNO); // Ref no ya gore satiri bulur.

            satir = dt.Rows.IndexOf(dr);               // DataRow kacinci sirada

            KayitGoster(satir);
        }
예제 #3
0
        private void Button5_Click(object sender, EventArgs e)
        {
            // Arama
            string sql = "SELECT * FROM MUSTERI WHERE UNVANI LIKE '%'+@p1+'%' OR ADRES LIKE '%'+@p2+'%' OR SEHIR LIKE '%'+@p3+'%'";
            List <SqlParameter> prms = new List <SqlParameter>();
            SqlParameter        prm1 = new SqlParameter("@p1", "");
            SqlParameter        prm2 = new SqlParameter("@p2", "");
            SqlParameter        prm3 = new SqlParameter("@p3", "");

            prms.Add(prm1);
            prms.Add(prm2);
            prms.Add(prm3);

            FrmARAMA arama = new FrmARAMA(prms, sql, "MUSTERI_REFNO");

            arama.ShowDialog();

            DataRow dr = dt.Rows.Find(FrmARAMA.REFNO);

            satir = dt.Rows.IndexOf(dr);

            KayitGetir(satir);
        }