Exemplo n.º 1
0
 //müşteri bilgileri güncellemek için fonksiyon
 private void Guncelle()
 {
     //müşteri güncelleme durumu başarılı ise
     if (veritabani.Musteri_Guncelle(Id, txt_TcNo.Text, txt_Ad.Text, txt_Soyad.Text, txt_Telefon.Text,
                                     txt_Meslek.Text, Convert.ToDateTime(dt_DogumTarih.Value), Convert.ToInt32(nud_Boy.Value), Convert.ToInt32(nud_Kilo.Value), txt_Adres.Text))
     {
         //bilgilendirme mesaj kutusu oluşturulur
         MessageBox.Show("Müşteri güncellendi.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information);
         //bu form(pencere) kapatılır
         this.Close();
     }
     //müşteri güncellenemez ise , hata oluşursa
     else
     {
         //hata mesajı kutusu oluşturma
         MessageBox.Show("Kayıt yapılamadı.\nBilgileri kontrol ediniz.", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }