/// <summary> /// 连接测试 /// </summary> /// <returns></returns> public string ConnTest() { ConfigData configData = new ConfigData(); ResultEx result= configData.ConnTest(); return JsonConvert.SerializeObject(result); }
/// <summary> /// 连接测试 /// </summary> /// <param name="serverName">服务名称</param> /// <param name="dataBase">数据库</param> /// <param name="user">用户名</param> /// <param name="pwd">用户密码</param> /// <returns></returns> public string ConnTest2(string serverName, string dataBase, string user, string pwd) { ConfigData configData = new ConfigData(); ResultEx result= configData.ConnTest(serverName, dataBase, user, pwd); return JsonConvert.SerializeObject(result); }
/// <summary> /// 设置配置文件 /// </summary> /// <param name="config"></param> public void SetDataConfig(DataConfigModel config) { ConfigData configData = new ConfigData(); configData.SaveConfig(config); }