Ejemplo n.º 1
0
        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();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 从交地字符串中提取区域字符。
 /// </summary>
 /// <returns></returns>
 public string ParseLocationArea()
 {
     return(string.IsNullOrEmpty(ToLocation)
         ? string.Empty
         : ToLocation.Substring(0, 1));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 从交地字符串中提取序号
 /// </summary>
 /// <returns></returns>
 public string ParseLocationNo()
 {
     return(string.IsNullOrEmpty(ToLocation) || ToLocation.Length < 3
         ? string.Empty
         : ToLocation.Substring(1, 2));
 }