Exemplo n.º 1
0
 void AreaInfoUpdate()
 {
     if (cbProvince.SelectedItem != null && cbProvince.SelectedItem.ToString() != mCurProvince)
     {
         mCurProvince = cbProvince.SelectedItem.ToString();
         mCurCity     = null;
         mCurArea     = null;
         this.cbArea.Items.Clear();
         this.cbCity.Items.Clear();
         this.cbCity.Items.AddRange(CAreaInfo.GetCities(mCurProvince));
         this.cbCity.SelectedIndex = 0;
         //mCurCity = cbCity.SelectedItem.ToString();
         return;
     }
     if (cbCity.SelectedItem != null && cbCity.SelectedItem.ToString() != mCurCity)
     {
         mCurCity = cbCity.SelectedItem.ToString();
         mCurArea = null;
         this.cbArea.Items.Clear();
         this.cbArea.Items.AddRange(CAreaInfo.GetAreas(mCurProvince, mCurCity));
         this.cbArea.SelectedIndex = 0;
         return;
     }
     if (cbArea.SelectedItem != null)
     {
         mCurArea = cbArea.SelectedItem.ToString();
     }
 }
Exemplo n.º 2
0
 void AreaInfoInit()
 {
     cbProvince.Items.AddRange(CAreaInfo.GetProvinces());
 }