public BindingList <Clan> VratiClanove() { OpstaSO so = new VratiSveClanoveSO(); Clan o = new Clan(); so.IzvrsiSO(o); return(((VratiSveClanoveSO)so).ClanoviList); }
//Pretrage za clana sve odjednom public BindingList <Clan> PretraziClanove(Clan c, string kriterijum) { OpstaSO so = new VratiSveClanoveSO(); so.IzvrsiSO(c); BindingList <Clan> svi = ((VratiSveClanoveSO)so).ClanoviList; BindingList <Clan> trazeni = new BindingList <Clan>(); foreach (Clan clan in svi) { switch (kriterijum) { case "brClKarte": if (clan.BrClanskeKarte == c.BrClanskeKarte) { trazeni.Add(clan); } break; case "ime": if (clan.Ime.Contains(c.Ime.ToLower()) || clan.Ime.Contains(c.Ime.ToUpper())) { trazeni.Add(clan); } break; case "prezime": if (clan.Prezime.Contains(c.Prezime.ToLower()) || clan.Prezime.Contains(c.Prezime.ToUpper())) { trazeni.Add(clan); } break; default: break; } } return(trazeni); }