Exemple #1
0
 private void BtnGuncelle_Click(object sender, EventArgs e)
 {
     try
     {
         SqlCommand guncellemeKomutu = new SqlCommand
                                           ("update ogrenciler set ogrenciTcNo='" +
                                           maskedTcNo.Text + "',ogrenciAd='" + txtOgrenciAd.Text +
                                           "',ogrenciSoyad='" + txtOgrenciSoyad.Text +
                                           "',ogrenciTelefon='" + maskedOgrenciTelefon.Text +
                                           "',ogrenciDogumTarihi='" + maskedDogumTarihi.Text +
                                           "',ogrenciBolum='" + comboBolum.Text + "',ogrenciMail='" +
                                           txtMail.Text + "',ogrenciOdaNo='" + comboOda.Text +
                                           "',ogrenciVeliAdSoyad='" + txtVeliAdSoyad.Text +
                                           "',ogrenciVeliTelefon='" + maskedVeliTelefon.Text +
                                           "',ogrenciAdres='" + richtxtAdres.Text + "' where ogrenciId='" + txtOgrenciId.Text + "'", veritabaniBaglantisi.baglan());
         guncellemeKomutu.ExecuteNonQuery();
         veritabaniBaglantisi.baglan().Close();
         MessageBox.Show("Kayıt Başarılı Bir Şekilde Güncellendi", "YILDIZLAR YURT KAYIT OTOMASYONU", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         sayfayiTemizle();
         frmOgrenciListe.Show();
         this.Close();
     }
     catch (Exception)
     {
         MessageBox.Show("HATA LÜTFEN YENİDEN EKLEYİN", "YILDIZLAR YURT KAYIT OTOMASYONU", MessageBoxButtons.OK, MessageBoxIcon.Error);
         veritabaniBaglantisi.baglan().Close();
     }
 }
        private void ÖğrenciDüzenleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmOgrenciListe frmOgrenciListe = new frmOgrenciListe();

            frmOgrenciListe.Show();
        }