Пример #1
0
        private void KartnoListele()
        {
            Kayitlar kayit = new Kayitlar();

            kayit.Kartid = Convert.ToInt64(txtkartnoara.Text);
            DataTable dt = kayit.KartidListele();

            dataGridView1.DataSource = dt;
        }
Пример #2
0
        private void VeriGetir()
        {
            Kayitlar kyt = new Kayitlar();

            kyt.Kartid = Convert.ToInt64(getir);
            DataTable dt = kyt.KartidListele();

            txtkartno.Text = dt.Rows[0]["KartId"].ToString();
            txttcno.Text   = dt.Rows[0]["TcNo"].ToString();
            txtadi.Text    = dt.Rows[0]["ad"].ToString();
            txtsoyadi.Text = dt.Rows[0]["soyad"].ToString();
            txtadres.Text  = dt.Rows[0]["adres"].ToString();
            if (dt.Rows[0]["resim"] != DBNull.Value)
            {
                resim = (byte[])dt.Rows[0]["resim"];
                MemoryStream ms = new MemoryStream(resim, 0, resim.Length);
                res = Image.FromStream(ms, true);
                pictureBox1.Image = res;
            }
        }