protected void ToPostCode_TextChanged(object sender, EventArgs e) { ToCity.Text = ""; ToState.Text = ""; TextBox textbox = sender as TextBox; if (textbox != null) { Repository repository = new Repository(); ArrayList arr = repository.GetAreaFromPostCode(textbox.Text); ToLocation.Items.Clear(); ToLocation.DataSource = arr; ToLocation.DataBind(); ToLocation.Items.Insert(0, new ListItem("")); } }
public BookingInformation() { to_location = new ToLocation(); }
/// <summary> /// 从交地字符串中提取区域字符。 /// </summary> /// <returns></returns> public string ParseLocationArea() { return(string.IsNullOrEmpty(ToLocation) ? string.Empty : ToLocation.Substring(0, 1)); }
/// <summary> /// 从交地字符串中提取序号 /// </summary> /// <returns></returns> public string ParseLocationNo() { return(string.IsNullOrEmpty(ToLocation) || ToLocation.Length < 3 ? string.Empty : ToLocation.Substring(1, 2)); }