/// <summary> /// /// </summary> /// <returns>1:数据库地址 2:数据库名称 3:数据库用户名 4:数据库密码</returns> // GET: api/MapConfig public IEnumerable <string> Get() { MapServer vSystemConfig = new MapServer(); SystemConfigEF vModel = vSystemConfig.GetMapConfig(); return(new string[] { vModel.ItemValue1, vModel.ItemValue2, vModel.ItemValue3, vModel.ItemValue4 }); }
public ActionResult MapServerConfig() { MapServerConfigViewModel vModel = new MapServerConfigViewModel(); MapServer vMapServer = new MapServer(); SystemConfigEF vMapConfigEF = vMapServer.GetMapConfig(); vModel.MapServerAddress = vMapConfigEF.ItemValue1; vModel.MapDBName = vMapConfigEF.ItemValue2; vModel.DBUserName = vMapConfigEF.ItemValue3; vModel.DBPassword = vMapConfigEF.ItemValue4; return View(vModel); }