Example #1
0
        private void barButtonItem26_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)//Öğrenci Ekleme Paneli Açılır
        {
            user.garbageCollector();
            Form x = new OgrEkle();

            this.Hide();
            x.Show();
        }
Example #2
0
        private async void textBox1_KeyPress(object sender, KeyPressEventArgs e) //Öğrenci T.c Kimlik Kontrol
        {
            progress.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
            if (e.KeyChar == 13 && ogrTc1.TextLength == 11)
            {
                ogrTc1.Enabled = false;
                bool isOk = false;
                öğrenci.tc = ogrTc1.Text;
                isOk       = await Task.Run(user.ogr_odaKontrol);

                if (isOk == true)
                {
                    MessageBox.Show("Öğrenci Odaya Başarıyla Yerleştirilebilir!", "BAŞARILI", MessageBoxButtons.OK);
                    oda_Ekle = true;
                }
                else
                {
                    MessageBox.Show("Öğrenci Odaya Yerleştirilemez!", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    isOk = false;
                    isOk = await Task.Run(user.ogr_kontrol);

                    user.garbageCollector();
                    if (isOk == true)
                    {
                        //Kayıt Yapılacak
                    }
                    else
                    {
                        //Öğrenci Oluşturulacak
                        Form x = new OgrEkle();
                        this.Hide();
                        x.Show();
                    }
                }
                ogrTc1.Enabled = true;
            }
            progress.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
        }