/// <summary> /// Author: Josephine Gad /// Date Created: 19/10/2012 /// Descrition: binds country to listview /// </summary> private void BindRestrictedNationality() { CountryBLL.GetRestrictedNationalityList(true, true, GlobalCode.Field2Int(uoDropDownListCountry.SelectedValue)); List <Nationality> restricted = (List <Nationality>)Session["NationalityGenericClass_RestNationalityList"]; List <Nationality> nonRestricted = (List <Nationality>)Session["NationalityGenericClass_NonRestNationalityList"]; uoDropDownListNationality.Items.Clear(); uoDropDownListNationality.DataSource = nonRestricted; uoDropDownListNationality.DataTextField = "NationalityName"; uoDropDownListNationality.DataValueField = "NationalityID"; uoDropDownListNationality.DataBind(); uoDropDownListNationality.Items.Insert(0, new ListItem("--Select Nationality--", "0")); uoButtonAdd.Visible = false; if (nonRestricted.Count > 0) { uoButtonAdd.Visible = true; } uoNationalityList.DataSource = restricted; uoNationalityList.DataBind(); }