private void UIOtelBilgiForm_Load(object sender, EventArgs e) { txt_OtelAdi.Text = otel.adi; txt_OtelAdres.Text = otel.adres; txt_OdaTipi.Text = otel.odaTipi; txt_OtelEPosta.Text = otel.ePosta; txt_OtelTelefon.Text = otel.telefon; txt_YildizSayisi.Text = otel.yildizSayisi.ToString(); txt_Il.Text = otel.il; txt_Ilce.Text = otel.ilce; txt_OdaSayisi.Text = otel.odaSayisi.ToString(); txt_Puan.Text = otel.otelPuani.ToString(); List <string> yorumlar = new List <string>(); yorumlar = otel.YorumlariAl(); string[] yorumSatir = new string[3]; for (int i = 0; i < yorumlar.Count; i++) { yorumSatir = yorumlar[i].Split('\n'); for (int j = 0; j < yorumSatir.Length; j++) { lstbx_Yorumlar.Items.Add(yorumSatir[j]); } } }
public List <string> YorumlariAl(Otel otel) { Otel tmpOtel = new Otel(); tmpOtel = otelAgaci.OtelAra(otel.adi).otel; return(tmpOtel.YorumlariAl()); }