示例#1
0
        //<configuration>
        //<appSettings>
        //    <add key="ConnectionString" value="Data Source=CODESERVER\SQL2k5;Initial Catalog=LindonERP;Persist Security Info=True;User Id=sa;Password=!@#123" />
        //    <add key="DataBaseType" value="SQLSERVER" />
        //</appSettings>
        //</configuration>
        #endregion

        #region public static string GetXml(string paramKey)
        /// <summary>
        ///  获取App.config中add节点的值值
        /// </summary>
        /// <param name="paramKey"></param>
        /// <returns></returns>
        public static string GetXml(string paramKey)
        {
            return(XMLReadeWrite.GetXml(paramKey, AppDomain.CurrentDomain.BaseDirectory + "Web.config", "configuration/appSettings/add"));
        }
示例#2
0
 /// <summary>
 ///   设置App.config值
 /// </summary>
 /// <param name="paramKey"></param>
 /// <returns></returns>
 public static void SetXml(string paramKey, string paramValue)
 {
     XMLReadeWrite.SetXml(paramKey, paramValue, "app.config", "configuration/appSettings/add");
 }