private void btnEnUygunMezunuBul_Click(object sender, EventArgs e) { OgrenciBilgi o = new OgrenciBilgi(); string anahtar = cbEnUygunMezun.SelectedItem.ToString(); int x = hm.hashFonksiyonu(anahtar, 3); o = hm.table[x].h.MaxHeapGetir(); txtEnUygunMezun.Text = "Adı:" + o.ad + " " + "Başarı Derecesi:" + o.BasariDerecesi + " " + "Telefonu:" + o.tel + " " + "Yabancı Dili:" + o.yabanciDil; }
public void OgrenciGuncelle(Heap h, OgrenciBilgi ogr) { for (int i = 0; i < h.currentSize; i++) { if (h.heapArray[i].ogr.ogrenciNo == ogr.ogrenciNo) { h.heapArray[i].ogr = ogr; } } }
private void btnMezunKayit_Click(object sender, EventArgs e) { OgrenciBilgi o = new OgrenciBilgi(); MezunBilgi mb = new MezunBilgi(); StajBilgi sb = new StajBilgi(); o.ad = txtOgrenciAd.Text; o.adres = txtOgrAdres.Text; o.dogumTarihi = Convert.ToDateTime(dtPDogumTarihi.Value); o.eposta = txtOgrePosta.Text; o.ilgiAlanlari = txtIlgiAlanları.Text; o.ogrenciNo = Convert.ToInt32(txtOgrenciNo.Text); o.sifre = txtOgrKayitSifre.Text; o.tel = txtOgrTel.Text; o.uyruk = cbUyruk.SelectedItem.ToString(); o.yabanciDil = cbYabanciDil.SelectedItem.ToString(); mb.baslangicYili = txtBaslangicYili.Text; mb.bitisYili = txtBitisYili.Text; if (rbEvet.Checked) { mb.basariBelgesi = true; } else if (rbHayir.Checked) { mb.basariBelgesi = false; } mb.bolumAdi = cbBolumAdi.SelectedItem.ToString(); mb.notOrtalamasi = Convert.ToDouble(txtNotOrtalamasi.Text); o.MezunBilgiListesi.InsertLast(mb); sb.departman = txtDepartman.Text; sb.gorev = txtGorev.Text; sb.sirketAdi = txtStajSirketi.Text; sb.stajTarihi = Convert.ToDateTime(stPStajTarihi.Value); o.BasariDerecesi = BasariDerecesiHesapla(mb.notOrtalamasi, mb.basariBelgesi); o.StajListesi.InsertLast(sb); o.MezunBilgiListesi.InsertLast(mb); aramaAgaci.Ekle(o); hm.Add(mb.bolumAdi, o); MessageBox.Show("Başarılı Bir Şekilde Kayıt Yaptınız"); txtOgrenciAd.Text = ""; txtOgrAdres.Text = " "; txtOgrePosta.Text = " "; txtIlgiAlanları.Text = " "; txtOgrenciNo.Text = " "; txtOgrKayitSifre.Text = " "; txtOgrTel.Text = " "; txtBaslangicYili.Text = " "; txtBitisYili.Text = ""; txtNotOrtalamasi.Text = ""; txtDepartman.Text = " "; txtGorev.Text = " "; txtStajSirketi.Text = " "; }
public bool Insert(OgrenciBilgi o) { if (currentSize == maxSize) { return(false); } HeapDugumu newHeapDugumu = new HeapDugumu(o); heapArray[currentSize] = newHeapDugumu; MoveToUp(currentSize++); return(true); }
public void Add(string key, OgrenciBilgi value) { int hash = hashFonksiyonu(key, 3); if (table[hash] == null) { table[hash] = new HashEntry(key); table[hash].h = new Heap(100); table[hash].h.Insert(value); } else { table[hash].h.Insert(value); } }
private void btnKayitSil_Click(object sender, EventArgs e) { OgrenciBilgi o = new OgrenciBilgi(); o.ogrenciNo = Convert.ToInt32(txtSilinecekOgrenciNo.Text); aramaDugum = aramaAgaci.OgrenciNumarasinaGoreAra(Convert.ToInt32(txtSilinecekOgrenciNo.Text)); aramaAgaci.Sil(o.ogrenciNo); string anahtar = aramaDugum.veri.MezunBilgiListesi.BolumBul(); int x = hm.hashFonksiyonu(anahtar, 3); hm.table[x].h.ElemanSil(aramaDugum.veri); MessageBox.Show("Kayıt Başarılı Bir Şekilde Silindi"); txtSilinecekOgrenciNo.Text = ""; }
private IkiliAramaAgacDugumu OgrenciNoGuncelle(IkiliAramaAgacDugumu dugum, OgrenciBilgi ogr) { if ((int)dugum.veri.ogrenciNo == ogr.ogrenciNo) { dugum.veri = ogr; return(dugum); } else if ((int)dugum.veri.ogrenciNo > ogr.ogrenciNo) { return(OgrenciNoGuncelle(dugum.sol, ogr)); } else { return(OgrenciNoGuncelle(dugum.sag, ogr)); } }
public HeapDugumu ElemanSil(OgrenciBilgi o) { int indis = 0; for (int i = 0; i < heapArray.Length; i++) { if (heapArray[i].ogr.ogrenciNo == o.ogrenciNo) { indis = i; break; } } HeapDugumu root = heapArray[indis]; heapArray[indis] = heapArray[--currentSize]; MoveToDown(indis); return(root); }
private void btnGuncelle_Click(object sender, EventArgs e) { OgrenciBilgi o = new OgrenciBilgi(); MezunBilgi mb = new MezunBilgi(); StajBilgi sb = new StajBilgi(); o.ad = txtGuncelAdSoyad.Text; o.adres = txtGuncelAdres.Text; o.dogumTarihi = Convert.ToDateTime(dtpGuncelDogumTarihi.Value); o.eposta = txtGuncelEposta.Text; o.ilgiAlanlari = txtGuncelIlgiAlanlari.Text; o.ogrenciNo = Convert.ToInt32(txtGuncelOgrenciNo.Text); o.sifre = txtGuncelSifre.Text; o.tel = txtGuncelTelefon.Text; o.uyruk = cbGuncelUyruk.SelectedItem.ToString(); o.yabanciDil = cbGuncelYabanciDil.SelectedItem.ToString(); mb.baslangicYili = txtGuncelBaslangicYili.Text; mb.bitisYili = txtGuncelBitisYili.Text; if (rbGuncelEvet.Checked) { mb.basariBelgesi = true; } else if (rbGuncelHayir.Checked) { mb.basariBelgesi = false; } mb.bolumAdi = cbGuncelBolumAdi.SelectedItem.ToString(); mb.notOrtalamasi = Convert.ToDouble(txtGuncelNotOrtalamasi.Text); o.MezunBilgiListesi.InsertLast(mb); sb.departman = txtGuncelDepartman.Text; sb.gorev = txtGuncelGorev.Text; sb.sirketAdi = txtGuncelSirketAdi.Text; sb.stajTarihi = Convert.ToDateTime(dtpGuncelStajTarihi.Value); o.BasariDerecesi = BasariDerecesiHesapla(mb.notOrtalamasi, mb.basariBelgesi); o.StajListesi.InsertLast(sb); o.MezunBilgiListesi.InsertLast(mb); aramaAgaci.OgrenciNumarasinaGoreGuncelle(o); int x = hm.hashFonksiyonu(mb.bolumAdi, 3); hm.OgrenciGuncelle(hm.table[x].h, o); MessageBox.Show("Güncelleme İşlemi Tamamlandı"); }
public void Ekle(OgrenciBilgi deger) { IkiliAramaAgacDugumu tempParent = new IkiliAramaAgacDugumu(); IkiliAramaAgacDugumu tempSearch = kok; while (tempSearch != null) { tempParent = tempSearch; if (deger.ogrenciNo == tempSearch.veri.ogrenciNo) { return; } else if (deger.ogrenciNo < tempSearch.veri.ogrenciNo) { tempSearch = tempSearch.sol; } else { tempSearch = tempSearch.sag; } } IkiliAramaAgacDugumu eklenecek = new IkiliAramaAgacDugumu(deger); if (kok == null) { kok = eklenecek; } else if (deger.ogrenciNo < tempParent.veri.ogrenciNo) { tempParent.sol = eklenecek; } else { tempParent.sag = eklenecek; } }
public IkiliAramaAgacDugumu(OgrenciBilgi ogr) { this.veri = ogr; sol = null; sag = null; }
public IkiliAramaAgacDugumu OgrenciNumarasinaGoreGuncelle(OgrenciBilgi ogr) { return(OgrenciNoGuncelle(kok, ogr)); }
public HeapDugumu(OgrenciBilgi o) { this.ogr = o; }
private void Form1_Load(object sender, EventArgs e) { Assembly a = Assembly.GetExecutingAssembly(); Stream stream = a.GetManifestResourceStream("MezunBilgiSistemiOdev.Resources.OgrenciBilgi.txt"); StreamReader oku = new StreamReader(stream); string yazi; while ((yazi = oku.ReadLine()) != null) { MezunBilgi mb = new MezunBilgi(); StajBilgi sb = new StajBilgi(); OgrenciBilgi o = new OgrenciBilgi(); o.ad = yazi; yazi = oku.ReadLine(); o.adres = yazi; yazi = oku.ReadLine(); o.tel = yazi; yazi = oku.ReadLine(); o.eposta = yazi; yazi = oku.ReadLine(); o.uyruk = yazi; yazi = oku.ReadLine(); o.dogumTarihi = Convert.ToDateTime(yazi); yazi = oku.ReadLine(); o.ogrenciNo = Convert.ToInt32(yazi); yazi = oku.ReadLine(); o.yabanciDil = yazi; yazi = oku.ReadLine(); o.ilgiAlanlari = yazi; yazi = oku.ReadLine(); sb.sirketAdi = yazi; yazi = oku.ReadLine(); sb.stajTarihi = Convert.ToDateTime(yazi); yazi = oku.ReadLine(); sb.departman = yazi; yazi = oku.ReadLine(); sb.gorev = yazi; yazi = oku.ReadLine(); if (yazi == "Yazilim Muhendisligi") { mb.bolumAdi = "Yazılım Mühendisliği"; } else if (yazi == "Makina ve Imalat Muhendisligi") { mb.bolumAdi = "Makina ve İmalat Mühendisliği"; } else if (yazi == "Enerji Sistemleri Muhendisligi") { mb.bolumAdi = "Enerji Sistemleri Mühendisliği"; } yazi = oku.ReadLine(); mb.baslangicYili = yazi; yazi = oku.ReadLine(); mb.bitisYili = yazi; yazi = oku.ReadLine(); mb.notOrtalamasi = Convert.ToDouble(yazi); yazi = oku.ReadLine(); mb.basariBelgesi = Convert.ToBoolean(yazi); yazi = oku.ReadLine(); o.BasariDerecesi = Convert.ToDouble(yazi); yazi = oku.ReadLine(); o.sifre = yazi; o.StajListesi.InsertLast(sb); o.MezunBilgiListesi.InsertLast(mb); hm.Add(mb.bolumAdi, o); aramaAgaci.Ekle(o); } aramaAgaci.PreOrder90(); txt90Ustu.Text = aramaAgaci.tempOrtalama; tb1.TabPages.Remove(tbpAnasayfa); tb1.TabPages.Remove(tbpGuncelle); }