Exemplo n.º 1
0
        void Duzenle()
        {
            string cumle = "update besin set besin_ad='" + txtBesinAd.Text + "', besin_adet='" + txtBesinAdet.Text + "', besin_kalori='" + txtKalori.Text + "' where id=" + Convert.ToInt16(txtGizli.Text);

            baglanti bag = new baglanti();

            bag.idu(cumle);
            MessageBox.Show("Kayıt düzenlendi", "Düzenleme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            doldur();
        }
Exemplo n.º 2
0
        void BesinEkle()
        {
            string cumle = "INSERT INTO besin (besin_ad, besin_adet ,besin_kalori) VALUES('" + txtBesinAd.Text + "','" + txtBesinAdet.Text + "','" + txtKalori.Text + "')";

            baglanti bag = new baglanti();

            bag.idu(cumle);
            MessageBox.Show("Yeni kayıt eklendi", "Kayıt", MessageBoxButtons.OK, MessageBoxIcon.Information);
            doldur();
        }
Exemplo n.º 3
0
 void ogeSil()
 {
     try
     {
         DialogResult cvp = MessageBox.Show("Seçili kayıt silinsinmi?", "Silme İşlemi", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (cvp == DialogResult.Yes)
         {
             string   cumle = "delete from musteri where id=" + seciliId;
             baglanti bag   = new baglanti();
             bag.idu(cumle);
             MessageBox.Show("Silme İşlemi Tamamlandı", "Silindi", MessageBoxButtons.OK, MessageBoxIcon.Information);
             doldur();
         }
     }
     catch (Exception hata)
     {
         MessageBox.Show(hata.Message);
     }
 }
Exemplo n.º 4
0
        void KulKaydet()
        {
            string cinsiyet = "Kadın";

            if (rdKalErkek.Checked)
            {
                cinsiyet = "Erkek";
            }
            else if (rdKalKAdin.Checked)
            {
                cinsiyet = "Kadın";
            }
            string cumle = "INSERT INTO musteri (adsoyad, yas, cinsiyet, boy, kilo, kalori) VALUES('" + txtKalAdSoyad.Text + "', '" + txtKalYas.Text + "', '" + cinsiyet + "', '" + txtKalBoy.Text + "', '" + txtKalKilo.Text + "', '" + txtKalGunlukKalori.Text + "')";

            baglanti bag = new baglanti();

            bag.idu(cumle);
            MessageBox.Show("Yeni kayıt eklendi", "Kayıt", MessageBoxButtons.OK, MessageBoxIcon.Information);
            doldur();
            txtKalAdSoyad.Text = string.Empty; txtKalBoy.Text = string.Empty; txtKalKilo.Text = string.Empty; txtKalYas.Text = string.Empty; txtKalGunlukKalori.Text = string.Empty;
        }
Exemplo n.º 5
0
        void KulDuz()
        {
            int    id       = Convert.ToInt16(txtGizli.Text);
            string cinsiyet = "Kadın";

            if (rdKalErkek.Checked)
            {
                cinsiyet = "Erkek";
            }
            else if (rdKalKAdin.Checked)
            {
                cinsiyet = "Kadın";
            }

            string cumle = "update musteri set adsoyad='" + txtKalAdSoyad.Text + "', yas='" + txtKalYas.Text + "', cinsiyet='" + cinsiyet + "', boy='" + txtKalBoy.Text + "', kilo='" + txtKalKilo.Text + "', kalori='" + txtKalGunlukKalori.Text + "' where id=" + Convert.ToInt16(txtGizli.Text);

            baglanti bag = new baglanti();

            bag.idu(cumle);
            MessageBox.Show("Kayıt düzenlendi", "Düzenleme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            doldur();
            txtKalAdSoyad.Text = string.Empty; txtKalBoy.Text = string.Empty; txtKalKilo.Text = string.Empty; txtKalYas.Text = string.Empty; txtKalGunlukKalori.Text = string.Empty;
        }