Example #1
0
 private void BtnOgrenciGiris_Click(object sender, EventArgs e)
 {
     try
     {
         Ogrenci o = new Ogrenci();
         o.OkulNo = txtOkulNo.Text.Trim();
         o.Sifre  = txtSifreOgrenci.Text.Trim();
         int snc = OgrenciBL.OgrenciSifre(o);
         if (snc == 1)
         {
             OgrenciEkran frm = new OgrenciEkran();
             ad = txtOkulNo.Text;
             frm.ShowDialog();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Bilgilerinizi kontrol ediniz", "Hata!!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             Application.Restart();
         }
     }
     catch (SqlException ex)
     {
         MessageBox.Show("Test" + ex.Number);
         throw;
     }
 }