示例#1
0
        /// <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 });
        }
示例#2
0
文件: MapServer.cs 项目: allayxm/GT
 public SystemConfigEF GetMapConfig()
 {
     SystemConfigEF vSystemEF = new SystemConfigEF();
     vSystemEF.ItemName = "MapServer";
     SystemConfigEF[] vData = m_BasicDBClass.SelectRecordsEx(vSystemEF);
     if (vData.Length > 0)
         vSystemEF = vData[0];
     return vSystemEF;
 }
示例#3
0
文件: MapServer.cs 项目: allayxm/GT
        public bool SetMapConfig( string MapServerAddress,string MapName,string DBUserName,string DBPassword)
        {
            SystemConfigEF vSystemEF = new SystemConfigEF();
            vSystemEF.ItemValue1 = MapServerAddress;
            vSystemEF.ItemValue2 = MapName;
            vSystemEF.ItemValue3 = DBUserName;
            vSystemEF.ItemValue4 = DBPassword;

            return m_BasicDBClass.UpdateRecord(vSystemEF, "ItemName='MapServer'");
        }
示例#4
0
 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);
 }