protected void btnSearch_Click(object sender, EventArgs e) { string city = Session["City"].ToString(); TheaterServices showTheaters=new TheaterServices(); GridViewTheaterList.DataSource = showTheaters.GetTheaters(city); GridViewTheaterList.DataBind(); }
public void LoadTheaters(String city) { //Method that extracts data to populate the table ITheater theaterServices = new TheaterServices(); IList<TheaterModelDTO> listOfTheaters = theaterServices.GetTheaters(city); //Transfer to Model TheaterSearchView.Model.ListOfTheaters = new List<TheaterLine>(); foreach (var item in listOfTheaters) { TheaterLine row = new TheaterLine(); row.TheaterID = item.TheaterID.ToString(); row.TheaterName = item.Name; TheaterSearchView.Model.ListOfTheaters.Add(row); } }