void OtelGetir() { asd = new HashMapChain(); DataTable table = OtellerAgac.Oteltable; Otel[] oteller = new Otel[table.Rows.Count]; for (int i = 0; i < table.Rows.Count; i++) { Otel otel = new Otel(); Araclar.PropertyDoldur <Otel>(otel, table, i); oteller[i] = otel; asd.OtelEkle(oteller[i].Il, oteller[i].Ilce, oteller[i]); } }
public List <Product> FilterByModel(string model) { if (isTradeMark) { FilterByTradeMark(TradeMark); if (HashMap == null) { HashMap = new HashMapChain(TradeMarkTree.Search(TradeMark).Products.Count); } HashMap.ClearTable(); foreach (var product in TradeMarkTree.Search(TradeMark).Products) { HashMap.AddItem(product.Model, product); } } else { FilterByName(Name); if (HashMap == null) { HashMap = new HashMapChain(NameTree.Search(Name).Products.Count); } HashMap.ClearTable(); foreach (var product in NameTree.Search(Name).Products) { HashMap.AddItem(product.Model, product); } } Products.Clear(); if (HashMap.GetItem(model).Cast <Product>().ToList().Count != 0) { Products = HashMap.GetItem(model).Cast <Product>().ToList(); } return(Products); }