protected void Page_Load(object sender, EventArgs e) { ContinentDatabase continentDatabase = new ContinentDatabase(); ContinentList.DataSource = continentDatabase.getAllContinent(); ContinentList.DataTextField = "title"; ContinentList.DataValueField = "id"; ContinentList.DataBind(); loadTable(); if (Request.QueryString["id"] != null) { id = int.Parse(Request.QueryString["id"]); AddCountry.Text = "Update Country"; CountryDatabase countryDatbase = new CountryDatabase(); CountryModel countryModel = countryDatbase.getCountry(id); ContinentList.Items.FindByValue(countryModel.ContinentId.ToString()); //countryTxtbox.Text = countryModel.Name; } }
public void IdShouldMatchContinent(int id, string continentName) { var sut = new ContinentList(); sut.GetContinent(id).Should().Be(continentName); }
public void ContinentListShouldExist() { var sut = new ContinentList(); sut.Should().NotBeNull(); }
public void ContinentListShouldContainAllColors() { var sut = new ContinentList(); sut.Count.Should().Be(6); }
public void UpdateContinents() { _continents = ContinentList.Create(this); }