private void cbbProvince_SelectedIndexChanged(object sender, EventArgs e) { string ProvinceNametemp = cbbProvince.SelectedItem.ToString(); string ProvinceName = ""; if (ProvinceNametemp.Contains("Tỉnh")) { ProvinceName = ProvinceNametemp.Substring(5); } if (ProvinceNametemp.Contains("Thành Phố")) { ProvinceName = ProvinceNametemp.Substring(10); } DataTable dt = SignUpController.IDProvince_Find(ProvinceName).Tables[0]; string IDTemp = dt.Rows[0][0].ToString(); int ID = int.Parse(IDTemp); DataTable District = SignUpController.District_Show(ID).Tables[0]; cbbDistrict.Items.Clear(); foreach (DataRow dr in District.Rows) { string temp = dr["DistrictName"].ToString(); cbbDistrict.Items.Add(temp); } }