示例#1
0
        /// <summary>
        /// 得到籍贯
        /// </summary>
        public string GetProvinceAndCity(string Birthplace)
        {
            string returnStr = "";

            string[] arrBirthplace = Birthplace.Split(',');
            if (arrBirthplace != null && arrBirthplace.Length > 1)
            {
                EyouSoft.BLL.CompanyStructure.City     bllCity     = new EyouSoft.BLL.CompanyStructure.City();
                EyouSoft.BLL.CompanyStructure.Province bllProvince = new EyouSoft.BLL.CompanyStructure.Province();
                if (arrBirthplace[0] != "")
                {
                    EyouSoft.Model.CompanyStructure.Province modelProvince = bllProvince.GetModel(Utils.GetInt(arrBirthplace[0]));
                    if (modelProvince != null)
                    {
                        returnStr += modelProvince.ProvinceName + "省";
                    }
                }
                if (arrBirthplace[1] != "")
                {
                    EyouSoft.Model.CompanyStructure.City modelCity = bllCity.GetModel(Utils.GetInt(arrBirthplace[1]));
                    if (modelCity != null)
                    {
                        returnStr += modelCity.CityName + "市";
                    }
                }
            }
            return(returnStr);
        }
示例#2
0
 /// <summary>
 /// 获得常用城市
 /// </summary>
 /// 修改:田想兵 2011.5.24
 /// 修改:弹出选择
 /// <param name="selectIndex"></param>
 protected void CityDataInit(int provinceId, int cityId)
 {
     if (provinceId != 0)
     {
         EyouSoft.BLL.CompanyStructure.Province   pBll   = new EyouSoft.BLL.CompanyStructure.Province();
         EyouSoft.Model.CompanyStructure.Province pModel = pBll.GetModel(provinceId);
         if (pModel != null)
         {
             lt_province.Text = pModel.ProvinceName;
             if (cityId != 0)
             {
                 EyouSoft.BLL.CompanyStructure.City   cBll   = new EyouSoft.BLL.CompanyStructure.City();
                 EyouSoft.Model.CompanyStructure.City cModel = cBll.GetModel(cityId);
                 //if (cModel != null)
                 //{
                 //    lt_city.Text = cModel.CityName;
                 //}
             }
         }
     }
 }