private void kaydetbuton_Click(object sender, EventArgs e)
        {
            if (isimbox.Text == "" || soyisimbox.Text == "" || ogrsifrebox.Text == "" || nobox.Text == "")
            {
                MessageBox.Show("Lütfen eksik kutu bırakmayınız. Alanları doldurunuz. Eğer öğrenci silme işlemi yapmak istiyorsanız butona tıklamayı unutmayınız.");
            }
            else
            {
                islem2          = new SinifOgrenciGiris();
                user2           = new SinifOgrenci();
                user2.İsim      = isimbox.Text;
                user2.Soyisim   = soyisimbox.Text;
                user2.OgrenciNo = Convert.ToInt64(nobox.Text);
                user2.Sifre     = ogrsifrebox.Text;


                if (islem2.InsertUser(user2))
                {
                    MessageBox.Show("Öğrenci Ekleme işleminiz başarıyla gerçekleşti.");
                }
                else
                {
                    MessageBox.Show("Bu okul numarası ile kayıtlı öğrenci sistemde zaten mevcuttur. Lütfen tekrar deneyiniz.");
                }
            }



            KayitSonrasiTemizleme(this);
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (boxİsim.Text == "" || boxSoyisim.Text == "" || boxSifre.Text == "" || boxNO.Text == "" || boxBolumID.Text == "")
            {
                MessageBox.Show("Lütfen eksik kutu bırakmayınız. Alanları doldurunuz. Bölümünüzü seçmeyi unutmayınız.");
            }
            else
            {
                SinifOgrenciGiris islem2 = new SinifOgrenciGiris();
                SinifOgrenci      user2  = new SinifOgrenci();
                //islem2 = new SinifOgrenciGiris();
                //user2 = new SinifOgrenci();
                user2.İsim      = boxİsim.Text;
                user2.Soyisim   = boxSoyisim.Text;
                user2.OgrenciNo = Convert.ToInt64(boxNO.Text);
                user2.Sifre     = boxSifre.Text;
                user2.BolumID   = Convert.ToInt32(boxBolumID.Text);


                if (islem2.InsertUser(user2))
                {
                    MessageBox.Show("Öğrenci Ekleme işleminiz başarıyla gerçekleşti.");
                }
                else
                {
                    MessageBox.Show("Bu okul numarası ile kayıtlı öğrenci sistemde zaten mevcuttur. Lütfen tekrar deneyiniz.");
                }
            }
        }