private void BindWhereToPlay() { int whereToPlayId = Request.QueryString["WhereToPlayId"].ToInt(); if (whereToPlayId > 0) { WhereToPlay whereToPlayLookup = WhereToPlayDAL.GetItem(whereToPlayId); if (whereToPlayLookup != null) { lblWhereToPlayId.Text = whereToPlayLookup.WhereToPlayId.ToString(); lblGameId.Text = whereToPlayLookup.GameId.ToString(); lblStateId.Text = whereToPlayLookup.StateId.ToString(); lblCityId.Text = whereToPlayLookup.CityId.ToString(); lblAddressName.Text = whereToPlayLookup.AddressName; lblAddressNumber.Text = whereToPlayLookup.AddressNumber.ToString(); lblStreet01.Text = whereToPlayLookup.Street01; lblStreet02.Text = whereToPlayLookup.Street02; lblZipCode.Text = whereToPlayLookup.ZipCode.ToString(); lblZipCodePlusFour.Text = whereToPlayLookup.ZipCodePlusFour.ToString(); } else { lblMessage.Text = "Location could not be found."; } } else { lblMessage.Text = "Invalid ID. Location record could not be found."; } }
private void BindWhereToPlayList() { WhereToPlayCollection whereToPlayList = new WhereToPlayCollection(); whereToPlayList = WhereToPlayDAL.GetCollection(); rptWhereToPlayList.DataSource = whereToPlayList; rptWhereToPlayList.DataBind(); }