private void FrmDegerlendirme_Load(object sender, EventArgs e) { List <Otel> oteller = new List <Otel>(); List <OtelYorum> otelyorumları = new List <OtelYorum>(); List <Personel> personels = new List <Personel>(); oteller = sql.OtelBilgiGetir(); for (int i = 0; i < oteller.Count; i++) { ikiliAramaAgaci.Ekle(oteller[i]); } personels = sql.PersonelBilgiGetir(); Otel tempOtel = new Otel(); for (int i = 0; i < personels.Count; i++) { string otelIsmi = personels[i].CalistigiOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.PersonelHead.InsertLast(personels[i]); } otelyorumları = sql.OtelYorumGetir(); for (int i = 0; i < otelyorumları.Count; i++) { string otelIsmi = otelyorumları[i].YorumlananOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.OtelYorumHead.InsertLast(otelyorumları[i]); } }
private void btndeneme_Click(object sender, EventArgs e) { SQLVeriGetirme verigetir = new SQLVeriGetirme(); List <Otel> oteller = new List <Otel>(); İkiliAramaAgaci ikiliAramaAgaci = new İkiliAramaAgaci(); oteller = verigetir.OtelBilgiGetir(); for (int i = 0; i < oteller.Count; i++) { ikiliAramaAgaci.Ekle(oteller[i]); } List <Personel> personels = new List <Personel>(); personels = verigetir.PersonelBilgiGetir(); Otel tempOtel = new Otel(); for (int i = 0; i < personels.Count; i++) { string otelIsmi = personels[i].CalistigiOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.PersonelHead.InsertLast(personels[i]); } List <OtelYorum> otelyorumları = new List <OtelYorum>(); otelyorumları = verigetir.OtelYorumGetir(); for (int i = 0; i < otelyorumları.Count; i++) { string otelIsmi = otelyorumları[i].YorumlananOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.OtelYorumHead.InsertLast(otelyorumları[i]); } //HashZincirleme hashZincirleme = new HashZincirleme(); /*for (int i = 0; i < oteller.Count; i++) * { * hashZincirleme.OtelEkle(oteller[i].plakaKodu, oteller[i]); * }*/ //Veritabanına eklemek için. /* ikiliAramaAgaci.InOrder(); * ikiliAramaAgaci.DugumleriYazdir();*/ }
private void FrmOtelBilgi_Load(object sender, EventArgs e) { SQLVeriGetirme verigetir = new SQLVeriGetirme(); List <Otel> oteller = new List <Otel>(); List <OtelYorum> otelyorumları = new List <OtelYorum>(); List <Personel> personels = new List <Personel>(); oteller = verigetir.OtelBilgiGetir(); for (int i = 0; i < oteller.Count; i++) { ikiliAramaAgaci.Ekle(oteller[i]); } personels = verigetir.PersonelBilgiGetir(); Otel tempOtel = new Otel(); for (int i = 0; i < personels.Count; i++) { string otelIsmi = personels[i].CalistigiOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.PersonelHead.InsertLast(personels[i]); } otelyorumları = verigetir.OtelYorumGetir(); for (int i = 0; i < otelyorumları.Count; i++) { string otelIsmi = otelyorumları[i].YorumlananOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.OtelYorumHead.InsertLast(otelyorumları[i]); } dt.Columns.Add("Otel ADI", typeof(string)); dt.Columns.Add("İl", typeof(string)); dt.Columns.Add("İlçe", typeof(string)); dt.Columns.Add("Adres", typeof(string)); dt.Columns.Add("Telefon", typeof(string)); dt.Columns.Add("Eposta", typeof(string)); dt.Columns.Add("Yıldız Sayısı", typeof(int)); dt.Columns.Add("Otel Puanı", typeof(string)); dt.Columns.Add("Oda Sayısı", typeof(int)); }
private void FrmOtelGuncelleme_Load(object sender, EventArgs e) { // TODO: Bu kod satırı 'otelBilgiSistemiDataSet3.OtelBilgi' tablosuna veri yükler. Bunu gerektiği şekilde taşıyabilir, veya kaldırabilirsiniz. this.otelBilgiTableAdapter.Fill(this.otelBilgiSistemiDataSet3.OtelBilgi); İkiliAramaAgaci ikiliAramaAgaci = new İkiliAramaAgaci(); SQLVeriGetirme verigetir = new SQLVeriGetirme(); List <Otel> oteller = new List <Otel>(); List <OtelYorum> otelyorumları = new List <OtelYorum>(); List <Personel> personels = new List <Personel>(); oteller = verigetir.OtelBilgiGetir(); for (int i = 0; i < oteller.Count; i++) { ikiliAramaAgaci.Ekle(oteller[i]); } personels = verigetir.PersonelBilgiGetir(); Otel tempOtel = new Otel(); for (int i = 0; i < personels.Count; i++) { string otelIsmi = personels[i].CalistigiOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.PersonelHead.InsertLast(personels[i]); } otelyorumları = verigetir.OtelYorumGetir(); for (int i = 0; i < otelyorumları.Count; i++) { string otelIsmi = otelyorumları[i].YorumlananOtel; tempOtel = ikiliAramaAgaci.Ara(otelIsmi).otel; tempOtel.OtelYorumHead.InsertLast(otelyorumları[i]); } }