Beispiel #1
0
 protected void btnInitCity_Click(object sender, EventArgs e)
 {
     try
     {
         foreach (var c in LFFK.DataManager.TableQuery <GisCityDO>().Select().From().ExecuteList())
         {
             LFFK.DataManager.Insert <CityDO>(new CityDO()
             {
                 CityId          = c.id,
                 CityName        = ConvertCityName(c.name),
                 FullName        = c.name,
                 EnglishName     = c.e_name,
                 Level           = c.level,
                 ParentId        = c.upid,
                 Sequence        = 1,
                 SingleSpellCode = NameHelper.ConvertToInitial(c.name),
                 SpellCode       = NameHelper.Convert(c.name),
                 LngCode         = c.lng,
                 LatCode         = c.lat
             }
                                              );
         }
         Response.Write("<BR/>完成!");
     }
     catch (Exception ex)
     {
         this.tbPinyin.Text = ex.ToString();
     }
 }