Esempio n. 1
0
 private void Sil()
 {
     try
     {
         if (txtkartno.Text != "")
         {
             Kayitlar kayit = new Kayitlar();
             kayit.Kartid = Convert.ToInt64(txtkartno.Text);
             bool durum = kayit.KayitSil();
             if (durum == true)
             {
                 MessageBox.Show("Kayıt Başarıyla Silindi....", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 btncikis.PerformClick();
             }
             else
             {
                 MessageBox.Show("Kayıt Silinirken Hata Oluştu !!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             }
         }
         else
         {
             MessageBox.Show("Lütfen Kart Numarasını Boş Bırakmayın !!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Kayıt Silinirken Hata Oluştu !!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }
Esempio n. 2
0
        public void Listele()
        {
            Kayitlar  kayit = new Kayitlar();
            DataTable dt    = kayit.Listele();

            dataGridView1.DataSource       = dt;
            dataGridView1.Columns[6].Width = 100;
        }
Esempio n. 3
0
        private void TarihListele()
        {
            Kayitlar kayit = new Kayitlar();

            kayit.Giristarih = txttarihara.Value.ToShortDateString().ToString();
            DataTable dt = kayit.TarihListele();

            dataGridView1.DataSource = dt;
        }
Esempio n. 4
0
        private void isimListele()
        {
            Kayitlar kayit = new Kayitlar();

            kayit.Ad = txtisimara.Text;
            DataTable dt = kayit.AdListele();

            dataGridView1.DataSource = dt;
        }
Esempio n. 5
0
        private void KartnoListele()
        {
            Kayitlar kayit = new Kayitlar();

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

            dataGridView1.DataSource = dt;
        }
Esempio n. 6
0
        private void TcListele()
        {
            Kayitlar kayit = new Kayitlar();

            kayit.TcNo = Convert.ToInt64(txttcnoara.Text);
            DataTable dt = kayit.TcListele();

            dataGridView1.DataSource = dt;
        }
Esempio n. 7
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;
            }
        }
Esempio n. 8
0
 private void Guncelle()
 {
     try
     {
         if (resimyolu != null)
         {
             ResimKaydet();
         }
         if (txtkartno.Text != "" && txtadi.Text != "" && txtadres.Text != "" && txtsoyadi.Text != "" && txttcno.Text != "")
         {
             Kayitlar kayit = new Kayitlar();
             kayit.Kartid     = Convert.ToInt64(txtkartno.Text);
             kayit.TcNo       = Convert.ToInt64(txttcno.Text);
             kayit.Ad         = txtadi.Text;
             kayit.Soyad      = txtsoyadi.Text;
             kayit.Giristarih = txttarih.Value.ToShortDateString().ToString();
             kayit.Adres      = txtadres.Text;
             kayit.Resim      = resim;
             bool durum = kayit.KayitGuncelle();
             if (durum == true)
             {
                 MessageBox.Show("Kayıt Başarıyla Güncellendi....", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 MessageBox.Show("Kayıt Güncellenirken Hata Oluştu !!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             }
         }
         else
         {
             MessageBox.Show("Lütfen Tüm Alanları Doldurun!!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Kayıt Güncellenirken Hata Oluştu !!!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }