/// <summary> /// Update the input text boxes with information for a selected town /// </summary> /// <param name="Id">The ID of a selected town</param> private void UpdateTextBoxes(int Id) { TownBusiness townBusiness = new TownBusiness(); Town town = townBusiness.GetTownById(Id); txtName.Text = town.Name; }
/// <summary> /// Populate the data grid with information about town with given town Id /// </summary> private void PopulateDataGridViewGetTownById() { dataGridView.Rows.Clear(); TownBusiness townBusiness = new TownBusiness(); int.TryParse(txtGet.Text, out int townId); var town = townBusiness.GetTownById(townId); DataPopulatorSingle(town); }