private void OnSearch() { List <City> listaGradova = new List <City>(); City sc = new City(); CitiesList.Clear(); listaGradova = sc.GetSearchDone(Search); foreach (var item in listaGradova) { CitiesList.Add(item); } }
public void OnShowAll() { bool check = true; if (check) { if (Selected == null) { List <City> listaGradova = new List <City>(); CitiesList.Clear(); City c = new City(); listaGradova = c.GetAllCitiesListDone(); foreach (var item in listaGradova) { CitiesList.Add(item); } List <Comment> com = new List <Comment>(); Comment ccc = new Comment(); CommentList.Clear(); com = ccc.GetAllComment(); foreach (var item in com) { CommentList.Add(item); } } else { List <City> listaGradova = new List <City>(); City c = new City(); c.CityName = Selected.CityName; List <Comment> com = new List <Comment>(); Comment ccc = new Comment(); CommentList.Clear(); com = ccc.GetAllCommentSelected(c.CityName.ToString()); foreach (var item in com) { CommentList.Add(item); } Selected = null; } } }
protected override void ClearData() { CitiesList.Clear(); }