Exemplo n.º 1
0
 public static Ogrenci OgrenciGetir(int Id)
 {
     try
     {
         return(OgrenciDAL.OgrenciGetir(Id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public static List <Ogrenci> OgrenciListele()
 {
     try
     {
         return(OgrenciDAL.OgrenciListele());
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 public static bool OgrenciGuncelle(Ogrenci o)
 {
     try
     {
         return(OgrenciDAL.OgrenciGuncelle(o));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 4
0
 public static bool OgrenciSil(int Id)
 {
     try
     {
         return(OgrenciDAL.OgrenciSil(Id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 5
0
 public static bool OgrenciEkle(Ogrenci ogr)
 {
     try
     {
         return(OgrenciDAL.OgrenciEkle(ogr));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 6
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            try
            {
                OgrenciEntity ogrenci = new OgrenciEntity();
                ogrenci.OgrenciAd          = txtOgrAd.Text;
                ogrenci.OgrenciSoyad       = txtOgrSoyad.Text;
                ogrenci.OgrenciTC          = mskTxtOgrTC.Text;
                ogrenci.OgrenciTelefon     = mskTxtOgrTel.Text;
                ogrenci.OgrenciDogumTarihi = mskTxtOgrTarih.Text;
                ogrenci.OgrenciVeliAdSoyad = txtVeliAdSoyad.Text;
                ogrenci.OgrenciVeliTelefon = mskTxtVeliTel.Text;
                ogrenci.OgrenciAdres       = rchTxtAdres.Text;
                ogrenci.OgrenciOdaNo       = cmbOgrOdaNo.Text;

                OgrenciDAL ogrDal = new OgrenciDAL();
                ogrDal.OgrenciEkle(ogrenci);

                try
                {
                    BorcDAL    BorcDal = new BorcDAL();
                    BorcEntity borc    = new BorcEntity();
                    borc.OgrenciAd        = ogrenci.OgrenciAd;
                    borc.OgrenciSoyad     = ogrenci.OgrenciSoyad;
                    borc.OgrenciKalanBorc = 3000;
                    BorcDal.OgrenciBorcEkle(borc);
                }
                catch (Exception)
                {
                    MessageBox.Show("Öğrenci Borç Eklenirken Hata Oluştu Lütfen Bilgileri Kontrol Ediniz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Öğrenci Eklenirken Hata Oluştu Lütfen Bilgileri Kontrol Ediniz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 7
0
 public OgrenciBLL()
 {
     ogrenciDAL = new OgrenciDAL();
 }