예제 #1
0
 //program ekleme fonksiyonu
 private void Ekle()
 {
     //program ekleme işlemi başarılı ise
     if (veritabani.Program_Ekle(MusteriId, txt_Alan.Text, txt_Antrenman.Text, txt_Diyet.Text, chb_Pazartesi.Checked, chb_Sali.Checked,
                                 chb_Carsamba.Checked, chb_Persembe.Checked, chb_Cuma.Checked, chb_Cumartesi.Checked))
     {
         //bilgilendirme mesaj kutusu
         MessageBox.Show("Program eklendi", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information);
         //bu form(pencere) kapatma
         this.Close();
     }
     //hata durumu ise
     else
     {
         //bilgi vermek için mesaj kutusu oluşturma
         MessageBox.Show("Program kaydı başarısız !!!", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }