RSSWeatherLayer.WeatherItemSelectionDlg.PopulateSubListProc C# (CSharp) Method

PopulateSubListProc() private method

Populate the listbox according to a selection criteria
private PopulateSubListProc ( ) : void
return void
		private void PopulateSubListProc()
		{
      //get the selection criteria
			string exp = txtSelect.Text;

      //in case that the user did not specify a criteria, populate the entire citiname list
			if(exp == "")
			{
				PopulateWeatherItemsTableProc();
				return;
			}

			//set query
			exp = "CITYNAME LIKE '" + exp + "%'";

      //do the criteria selection against the table
			DataRow[] rows = m_weatherItemsTable.Select(exp);

      //iterate through the selectionset
			foreach(DataRow r in rows)
			{
        //add the cityName to the listbox
        AddListItemString(Convert.ToString(r[0]));
			}
		}